ignore hidden buttons when emulating clicks on them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-09-02 08:20:05 +00:00
parent 42c60e749f
commit 08f8037109

View File

@ -388,7 +388,7 @@ bool wxDialog::EmulateButtonClickIfPresent(int id)
{
wxButton *btn = wxDynamicCast(FindWindow(id), wxButton);
if ( !btn || !btn->IsEnabled() )
if ( !btn || !btn->IsEnabled() || !btn->IsShown() )
return false;
btn->MSWCommand(BN_CLICKED, 0 /* unused */);