From 05501a213c0e9854ae6edb9f52263dce14c94173 Mon Sep 17 00:00:00 2001 From: RomainFT Date: Sun, 19 Feb 2023 23:45:03 +0100 Subject: [PATCH] don't update the options when pressing with the last button #357 --- debian/changelog | 1 + src/tools/classic_tools/abstract_classic_tool.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index f9002338..be2547e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ drawing (1.2.0) unstable; urgency=low * move the "use color editor" option to the preferences window * fix the "use color editor" action * move the option to cut out a background color from "paint" to "eraser" (#503) + * better update the preview of most tools when their options change (#357) * update the user help manual * preserve transparency of the original area when skewing with a solid background color * update several translations diff --git a/src/tools/classic_tools/abstract_classic_tool.py b/src/tools/classic_tools/abstract_classic_tool.py index 78c26528..b60f65e4 100644 --- a/src/tools/classic_tools/abstract_classic_tool.py +++ b/src/tools/classic_tools/abstract_classic_tool.py @@ -57,9 +57,8 @@ def build_bottom_pane(self): def set_common_values(self, event_btn, event_x, event_y): self.x_press = event_x self.y_press = event_y - # TODO eventually all tools will correctly rely on on_options_changed so - # this call to _set_options will only exist if the button changed - self._set_options(event_btn) + if event_btn != self._last_btn: + self._set_options(event_btn) self._last_btn = event_btn def on_options_changed(self):