Don't return values from events.
This commit is contained in:
parent
8f85149c96
commit
9668994046
@ -129,10 +129,10 @@ class TabBar(QTabBar):
|
||||
def mousePressEvent(self, e):
|
||||
"""Override mousePressEvent to emit tabCloseRequested on rightclick."""
|
||||
if e.button() != Qt.RightButton:
|
||||
return super().mousePressEvent(e)
|
||||
super().mousePressEvent(e)
|
||||
idx = self.tabAt(e.pos())
|
||||
if idx == -1:
|
||||
return super().mousePressEvent(e)
|
||||
super().mousePressEvent(e)
|
||||
self.tabCloseRequested.emit(idx)
|
||||
|
||||
def tabSizeHint(self, index):
|
||||
|
@ -520,7 +520,7 @@ class WebView(QWebView):
|
||||
self.scroll_pos = perc
|
||||
self.scroll_pos_changed.emit(*perc)
|
||||
# Let superclass handle the event
|
||||
return super().paintEvent(e)
|
||||
super().paintEvent(e)
|
||||
|
||||
def mousePressEvent(self, e):
|
||||
"""Extend QWidget::mousePressEvent().
|
||||
@ -539,7 +539,7 @@ class WebView(QWebView):
|
||||
"""
|
||||
if e.button() in (Qt.XButton1, Qt.XButton2):
|
||||
self._mousepress_backforward(e)
|
||||
return super().mousePressEvent(e)
|
||||
super().mousePressEvent(e)
|
||||
self._mousepress_insertmode(e)
|
||||
self._mousepress_opentarget(e)
|
||||
return super().mousePressEvent(e)
|
||||
super().mousePressEvent(e)
|
||||
|
Loading…
Reference in New Issue
Block a user