Check if currentWidget is None in tabbed_browser.on_mode_left.
Fixes #186.
This commit is contained in:
parent
6d2111bcd4
commit
1c551975c4
@ -496,7 +496,10 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
def on_mode_left(self, mode):
|
def on_mode_left(self, mode):
|
||||||
"""Give focus to current tab if command mode was left."""
|
"""Give focus to current tab if command mode was left."""
|
||||||
if mode == usertypes.KeyMode.command:
|
if mode == usertypes.KeyMode.command:
|
||||||
self.currentWidget().setFocus()
|
widget = self.currentWidget()
|
||||||
|
if widget is None:
|
||||||
|
return
|
||||||
|
widget.setFocus()
|
||||||
|
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
def on_current_changed(self, idx):
|
def on_current_changed(self, idx):
|
||||||
|
Loading…
Reference in New Issue
Block a user