X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eec92d76f8798c69f117315a7b41d08b769e31e0..b4414c1f3778c54fb0ddfd2eea63f940bbee6d0f:/utils/wxPython/lib/buttons.py diff --git a/utils/wxPython/lib/buttons.py b/utils/wxPython/lib/buttons.py index e02f28850e..7d63710314 100644 --- a/utils/wxPython/lib/buttons.py +++ b/utils/wxPython/lib/buttons.py @@ -381,6 +381,7 @@ class __ToggleMixin: def OnLeftDown(self, event): if not self.IsEnabled(): return + self.saveUp = self.up self.up = not self.up self.CaptureMouse() self.SetFocus() @@ -389,7 +390,8 @@ class __ToggleMixin: def OnLeftUp(self, event): if not self.IsEnabled(): return - self.Notify() + if self.up != self.saveUp: + self.Notify() self.ReleaseMouse() self.Refresh()