From 343e4024037d5fcc33debcebe24623cb4879ad4f Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:33:01 +0900 Subject: [PATCH] fix: toggle button sensitivity on map --- dzgui/views/components/mod_panel.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dzgui/views/components/mod_panel.py b/dzgui/views/components/mod_panel.py index 5f05337..c7ed63f 100644 --- a/dzgui/views/components/mod_panel.py +++ b/dzgui/views/components/mod_panel.py @@ -61,6 +61,15 @@ class ModSelectionPanel(Gtk.Box): for el in header, self.main_panel, self.stale_panel: self.pack_start(el, NO_EXPAND, FILL, NO_PADDING) + self.connect("map", self._reinit_button) + + def _reinit_button(self, s) -> None: + for child in self.stale_panel.get_children(): + if child.enum == ModButton.UNHIGHLIGHT_STALE: + child.set_sensitive(False) + else: + child.set_sensitive(True) + def _on_mods_highlighted(self, emitter: "Emitter") -> None: self.swap_sensitive(True)