diff --git a/dzgui/views/components/filter_panel.py b/dzgui/views/components/filter_panel.py index 1c01885..8dfd412 100644 --- a/dzgui/views/components/filter_panel.py +++ b/dzgui/views/components/filter_panel.py @@ -212,10 +212,11 @@ class FilterPanel(Gtk.Box): # TODO: use same sort of signal to reinitialize keyword and checks def _on_maps_loaded(self, emitter: "Emitter", store: Gtk.ListStore) -> None: - self.is_first_run = True self.maps_combo.set_model(store) tv = self.controller.get_active_treeview() ind, name = tv.filter_man.get_active_map() + # NOTE: setting active index triggers a 'changed' signal on self.maps_combo + self.block_map_change_propagation = True self.maps_combo.set_active(ind) self.button_grid.reload_filters() @@ -313,9 +314,7 @@ class FilterPanel(Gtk.Box): filter_man.set_prior_map(name) filter_man.set_active_map(ind, name) - # TODO: 2026-03-29 - # don't signal controller to refilter if we are switching pages - if self.is_first_run: - self.is_first_run = False + if self.block_map_change_propagation: + self.block_map_change_propagation = False return self.emitter.emit("map_selection_changed", name)