Skip to content

Commit

Permalink
voctogui.lib.presetcontroller: only call set_command() if its actuall…
Browse files Browse the repository at this point in the history
…y different
  • Loading branch information
Kunsi committed Nov 23, 2024
1 parent be79c16 commit 3b97535
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions voctogui/lib/presetcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ def on_btn_toggled(self, btn):
return
self.log.debug(f"{self.button_to_composites[id]=}")
self.log.info(f"Selecting {self.button_to_composites[id]} for next scene")
self.preview_controller.set_command(self.button_to_composites[id])
self.log.debug(f"<on_btn_toggle {btn=}")
if not self._compare_command(
self.button_to_composites[id],
self.preview_controller.command(),
):
self.preview_controller.set_command(self.button_to_composites[id])
self.log.debug(f"<on_btn_toggle {btn=} {id=}")

def _compare_command(self, commandA, commandB):
return (
Expand Down

0 comments on commit 3b97535

Please sign in to comment.