Add missing returns after calling superclass events.

We fscked that up in 9668994046.
This commit is contained in:
Florian Bruhin 2014-06-23 10:18:27 +02:00
parent 6774445497
commit 752422c351
2 changed files with 3 additions and 0 deletions

View File

@ -130,9 +130,11 @@ class TabBar(QTabBar):
"""Override mousePressEvent to emit tabCloseRequested on rightclick."""
if e.button() != Qt.RightButton:
super().mousePressEvent(e)
return
idx = self.tabAt(e.pos())
if idx == -1:
super().mousePressEvent(e)
return
self.tabCloseRequested.emit(idx)
def tabSizeHint(self, index):

View File

@ -548,6 +548,7 @@ class WebView(QWebView):
if e.button() in (Qt.XButton1, Qt.XButton2):
self._mousepress_backforward(e)
super().mousePressEvent(e)
return
self._mousepress_insertmode(e)
self._mousepress_opentarget(e)
super().mousePressEvent(e)