mirror of
https://github.com/libratbag/piper.git
synced 2026-05-19 12:26:00 -04:00
mouseperspective: enable the "commit" button if any profile is dirty
..not only the active one. This fixes the "commit" button not getting active when another profile is disabled outside of Piper (e.g. ratbagctl).
This commit is contained in:
@@ -198,11 +198,10 @@ class MousePerspective(Gtk.Overlay):
|
||||
def _on_profile_notify_dirty(
|
||||
self, profile: RatbagdProfile, pspec: Optional[GObject.ParamSpec]
|
||||
) -> None:
|
||||
if profile is not self._profile:
|
||||
return
|
||||
device_dirty = any(p.dirty for p in self._device.profiles)
|
||||
|
||||
style_context = self.button_commit.get_style_context()
|
||||
if profile.dirty:
|
||||
if device_dirty:
|
||||
style_context.add_class("suggested-action")
|
||||
self.button_commit.set_sensitive(True)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user