From ad0e5b2abfd02d9611baba5b811a0284d62b8724 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Fri, 30 Jun 2023 13:36:27 +0200 Subject: [PATCH] Allow escape to leave the hidden library --- src/window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/window.py b/src/window.py index 9394020..a7b3e01 100644 --- a/src/window.py +++ b/src/window.py @@ -303,13 +303,13 @@ class CartridgesWindow(Adw.ApplicationWindow): search_entry.set_text("") def on_escape_action(self, *_args): - if self.stack.get_visible_child() == self.details_view: - self.on_go_back_action() - elif ( + if ( self.get_focus() == self.search_entry.get_focus_child() or self.hidden_search_entry.get_focus_child() ): self.on_toggle_search_action() + else: + self.on_go_back_action() def on_undo_action(self, _widget, game=None, undo=None): if not game: # If the action was activated via Ctrl + Z