toggle button doesn't send event if mouse is released outside of the

button.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-02-18 21:21:04 +00:00
parent 352f281a24
commit c4c829aeab

View File

@@ -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()