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
|
@ -107,7 +107,10 @@ func (tabs *Tabs) Select(index int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if tabs.Selected != index {
|
if tabs.Selected != index {
|
||||||
tabs.pushHistory(tabs.Selected)
|
// only push valid tabs onto the history
|
||||||
|
if tabs.Selected < len(tabs.Tabs) {
|
||||||
|
tabs.pushHistory(tabs.Selected)
|
||||||
|
}
|
||||||
tabs.Selected = index
|
tabs.Selected = index
|
||||||
tabs.TabStrip.Invalidate()
|
tabs.TabStrip.Invalidate()
|
||||||
tabs.TabContent.Invalidate()
|
tabs.TabContent.Invalidate()
|
||||||
|
|
Loading…
Reference in New Issue