widgets.tabbedbrowser: Fix closing tab with mouse.
This commit is contained in:
parent
b6cd0dd600
commit
6015bed786
@ -291,7 +291,12 @@ class TabbedBrowser(TabWidget):
|
||||
@pyqtSlot(int)
|
||||
def on_tab_close_requested(self, idx):
|
||||
"""Close a tab via an index."""
|
||||
self.close_tab(idx)
|
||||
tab = self.widget(idx)
|
||||
if tab is None:
|
||||
log.webview.debug("Got invalid tab {} for index {}!".format(
|
||||
tab, idx))
|
||||
return
|
||||
self.close_tab(tab)
|
||||
|
||||
@pyqtSlot(WebView)
|
||||
def on_window_close_requested(self, widget):
|
||||
|
Loading…
Reference in New Issue
Block a user