fix(input_manager): enable Escape key to close dialogs
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -874,9 +874,12 @@ class InputManager(QObject):
|
|||||||
self.file_explorer.previous_dir()
|
self.file_explorer.previous_dir()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Close AddGameDialog with Escape
|
# Close Dialogs with Escape
|
||||||
if key == Qt.Key.Key_Escape and isinstance(popup, QDialog):
|
if key == Qt.Key.Key_Escape:
|
||||||
popup.reject()
|
if isinstance(focused, QLineEdit):
|
||||||
|
return False
|
||||||
|
if isinstance(active_win, QDialog):
|
||||||
|
active_win.reject()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# FullscreenDialog navigation
|
# FullscreenDialog navigation
|
||||||
|
Reference in New Issue
Block a user