Fix pushing invalid tabs to history
A tab can now only be pushed onto the history if it is a selectable tab.
This commit is contained in:
parent
f1b365dfc3
commit
2542c65af2
1 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,10 @@ func (tabs *Tabs) Select(index int) {
|
|||
}
|
||||
|
||||
if tabs.Selected != index {
|
||||
// only push valid tabs onto the history
|
||||
if tabs.Selected < len(tabs.Tabs) {
|
||||
tabs.pushHistory(tabs.Selected)
|
||||
}
|
||||
tabs.Selected = index
|
||||
tabs.TabStrip.Invalidate()
|
||||
tabs.TabContent.Invalidate()
|
||||
|
|
Loading…
Reference in a new issue