Only hide temporary error message on non-modifiers
This commit is contained in:
parent
cb47ae1b43
commit
c2e3039702
@ -107,7 +107,7 @@ class QuteBrowser(QApplication):
|
|||||||
self.setQuitOnLastWindowClosed(False)
|
self.setQuitOnLastWindowClosed(False)
|
||||||
self.lastWindowClosed.connect(self.shutdown)
|
self.lastWindowClosed.connect(self.shutdown)
|
||||||
self.mainwindow.tabs.keypress.connect(
|
self.mainwindow.tabs.keypress.connect(
|
||||||
self.mainwindow.status.clear_tmp_text)
|
self.mainwindow.status.keypress)
|
||||||
self.mainwindow.tabs.keypress.connect(self.keyparser.handle)
|
self.mainwindow.tabs.keypress.connect(self.keyparser.handle)
|
||||||
self.keyparser.set_cmd_text.connect(
|
self.keyparser.set_cmd_text.connect(
|
||||||
self.mainwindow.status.cmd.set_cmd_text)
|
self.mainwindow.status.cmd.set_cmd_text)
|
||||||
|
@ -170,6 +170,19 @@ class StatusBar(QWidget):
|
|||||||
"""Clear a temporary text."""
|
"""Clear a temporary text."""
|
||||||
self.disp_tmp_text('')
|
self.disp_tmp_text('')
|
||||||
|
|
||||||
|
@pyqtSlot('QKeyEvent')
|
||||||
|
def keypress(self, e):
|
||||||
|
"""Hide temporary error message if a key was pressed.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
e: The original QKeyEvent.
|
||||||
|
|
||||||
|
"""
|
||||||
|
if e.key() in [Qt.Key_Control, Qt.Key_Alt, Qt.Key_Shift, Qt.Key_Meta]:
|
||||||
|
# Only modifier pressed, don't hide yet.
|
||||||
|
return
|
||||||
|
self.clear_tmp_text()
|
||||||
|
|
||||||
def resizeEvent(self, e):
|
def resizeEvent(self, e):
|
||||||
"""Extend resizeEvent of QWidget to emit a resized signal afterwards.
|
"""Extend resizeEvent of QWidget to emit a resized signal afterwards.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user