Skip to content

Commit

Permalink
voctogui.lib.toolbar.preview: only set_command() if sources change
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Nov 23, 2024
1 parent 0c7fd8d commit 1c88dbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions voctogui/lib/toolbar/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ def set_command(self, command, do_test=True):
def on_best(self, best, targetA, targetB):
self.log.debug(f">on_best {best=} {targetA=} {targetB=}")
c = self.command()
c.A = targetA
c.B = targetB
self.set_command(c, False)
if c.A != targetA or c.B != targetB:
c.A = targetA
c.B = targetB
self.set_command(c, False)
self.update_glow()
self.log.debug(f"<on_best {best=} {targetA=} {targetB=}")

Expand Down

0 comments on commit 1c88dbb

Please sign in to comment.