]> git.saurik.com Git - wxWidgets.git/commitdiff
moved test for valid controlpart into this method
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 23 Nov 2001 22:26:21 +0000 (22:26 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 23 Nov 2001 22:26:21 +0000 (22:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/button.cpp
src/mac/carbon/button.cpp

index 19600ac5d797cf03fb6c383d28dc2938e21c7bba..03ce6f1b293bb43fb824804c9ee0d162347fcc10 100644 (file)
@@ -108,8 +108,11 @@ void wxButton::Command (wxCommandEvent & event)
 
 void wxButton::MacHandleControlClick( ControlHandle control , SInt16 controlpart ) 
 {
+  if ( controlpart != kControlNoPart )
+  {
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
     event.SetEventObject(this);
     ProcessCommand(event);
+  }
 }
 
index 19600ac5d797cf03fb6c383d28dc2938e21c7bba..03ce6f1b293bb43fb824804c9ee0d162347fcc10 100644 (file)
@@ -108,8 +108,11 @@ void wxButton::Command (wxCommandEvent & event)
 
 void wxButton::MacHandleControlClick( ControlHandle control , SInt16 controlpart ) 
 {
+  if ( controlpart != kControlNoPart )
+  {
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
     event.SetEventObject(this);
     ProcessCommand(event);
+  }
 }