X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d167fc518a2f59d76f683da70a07f55bcbb95345..2fb0cabbf9e924c25d51b13bf7aa1ba8aa24e75e:/wxPython/wx/lib/buttons.py?ds=inline

diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py
index 7f19817547..6339ead1fd 100644
--- a/wxPython/wx/lib/buttons.py
+++ b/wxPython/wx/lib/buttons.py
@@ -529,10 +529,10 @@ class __ToggleMixin:
         if not self.IsEnabled() or not self.HasCapture():
             return
         if self.HasCapture():
-            if self.up != self.saveUp:
-                self.Notify()
             self.ReleaseMouse()
             self.Refresh()
+            if self.up != self.saveUp:
+                self.Notify()
 
     def OnKeyDown(self, event):
         event.Skip()