X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/412e0d47c05d69cb029e9dbd11b31ce24fb2377e..aa78d22e2008726218d47da1f2ac5864c11b8ebb:/src/univ/toolbar.cpp diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index bb134fe21f..66e6b21623 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -649,6 +649,17 @@ bool wxToolBar::PerformAction(const wxControlAction& action, PerformAction( wxACTION_BUTTON_RELEASE, numArg ); PerformAction( wxACTION_BUTTON_CLICK, numArg ); + + // Write by Danny Raynor to change state again. + // Check button still pressed or not + if( tool->IsInverted() ) + { + PerformAction( wxACTION_TOOLBAR_RELEASE, numArg ); + } + + // Set mouse leave toolbar button range (If still in the range, + // toolbar button would get focus again + PerformAction( wxACTION_TOOLBAR_LEAVE, numArg ); } else if ( action == wxACTION_TOOLBAR_PRESS ) {