Don't always clear status cmd text on focusOut
This commit is contained in:
parent
014f73a2dd
commit
90cbf5362f
@ -130,9 +130,11 @@ class StatusCommand(QLineEdit):
|
|||||||
self.setText(text)
|
self.setText(text)
|
||||||
self.setFocus()
|
self.setFocus()
|
||||||
|
|
||||||
def focusOutEvent(self, event):
|
def focusOutEvent(self, e):
|
||||||
self.setText('')
|
if e.reason() in [Qt.MouseFocusReason, Qt.TabFocusReason,
|
||||||
super().focusOutEvent(event)
|
Qt.BacktabFocusReason, Qt.OtherFocusReason]:
|
||||||
|
self.setText('')
|
||||||
|
super().focusOutEvent(e)
|
||||||
|
|
||||||
def focusInEvent(self, event):
|
def focusInEvent(self, event):
|
||||||
self.parent.clear_error()
|
self.parent.clear_error()
|
||||||
|
Loading…
Reference in New Issue
Block a user