From: Christian Heller Date: Wed, 25 Sep 2024 06:02:53 +0000 (+0200) Subject: Browser: Fix click on sorter not expanding values list. X-Git-Url: https://plomlompom.com/repos/task?a=commitdiff_plain;h=b5fdf887e7b84f156ec2ea99e4ed33c4cab33bc2;p=stable_plom Browser: Fix click on sorter not expanding values list. --- diff --git a/browser.py b/browser.py index 858fa8d..ecbe831 100755 --- a/browser.py +++ b/browser.py @@ -638,7 +638,6 @@ class MainWindow(Gtk.Window): self.sort_order_last_selected.get_last_child().hide() list_item = self.sort_selection.props.selected_item.widget list_item.get_parent().grab_focus() - list_item.get_last_child().show() self.sort_order_last_selected = list_item self.sort_order_last_selected = None @@ -648,10 +647,11 @@ class MainWindow(Gtk.Window): factory = Gtk.SignalListItemFactory() factory.connect('setup', setup_sort_order_item) factory.connect('bind', bind_sort_order_item) - selector = Gtk.ListView(model=self.sort_selection, factory=factory) + self.sort_list_view = Gtk.ListView(model=self.sort_selection, + factory=factory) sort_box = Gtk.Box(orientation=OR_V) sort_box.append(Gtk.Label(label='** sort order **')) - sort_box.append(selector) + sort_box.append(self.sort_list_view) self.btn_activate_sort = Gtk.Button(label='activate') self.btn_activate_sort.props.sensitive = False self.btn_activate_sort.connect( @@ -719,6 +719,8 @@ class MainWindow(Gtk.Window): focused = self.get_focus() if isinstance(focused, GallerySlot): self.gallery.on_focus_slot(focused) + elif focused.get_parent() == self.sort_list_view: + focused.get_first_child().get_last_child().show() def on_resize(self): """On window resize, do .gallery.on_resize towards its new geometry."""