From 461a37f596c27c84af5868c6072c07eb344c536c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 23 Nov 2001 22:26:21 +0000 Subject: [PATCH] moved test for valid controlpart into this method git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/button.cpp | 3 +++ src/mac/carbon/button.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 19600ac5d7..03ce6f1b29 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -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); + } } diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index 19600ac5d7..03ce6f1b29 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -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); + } } -- 2.45.2