Fix weird issue with text editor capturing enter key without having focus
This commit is contained in:
@@ -591,6 +591,9 @@ class GuiDocEditor(QTextEdit):
|
||||
as it is triggered on every keypress when typing.
|
||||
"""
|
||||
self.hasSelection = self.textCursor().hasSelection()
|
||||
if not self.hasFocus():
|
||||
# Block the event when the focus is on the search bar.
|
||||
return
|
||||
|
||||
if keyEvent.modifiers() == Qt.ShiftModifier:
|
||||
theKey = keyEvent.key()
|
||||
|
||||
Reference in New Issue
Block a user