Ignore on_current_changed when last tab is closed. Fixes #146.
This commit is contained in:
parent
48a7a428a5
commit
0d2ce778f3
@ -496,6 +496,9 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
@pyqtSlot(int)
|
||||
def on_current_changed(self, idx):
|
||||
"""Set last-focused-tab and leave hinting mode when focus changed."""
|
||||
if idx == -1:
|
||||
# closing the last tab (before quitting)
|
||||
return
|
||||
tab = self.widget(idx)
|
||||
tab.setFocus()
|
||||
modeman.maybe_leave(usertypes.KeyMode.hint, 'tab changed')
|
||||
|
Loading…
Reference in New Issue
Block a user