X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9f620daf40510ec72fde34c8623709c12430b5c..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/common/dlgcmn.cpp diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 1355125f52..dd09b3a322 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -456,6 +456,7 @@ void wxDialogBase::SetEscapeId(int escapeId) bool wxDialogBase::EmulateButtonClickIfPresent(int id) { +#if wxUSE_BUTTON wxButton *btn = wxDynamicCast(FindWindow(id), wxButton); if ( !btn || !btn->IsEnabled() || !btn->IsShown() ) @@ -466,6 +467,10 @@ bool wxDialogBase::EmulateButtonClickIfPresent(int id) btn->GetEventHandler()->ProcessEvent(event); return true; +#else // !wxUSE_BUTTON + wxUnusedVar(id); + return false; +#endif // wxUSE_BUTTON/!wxUSE_BUTTON } bool wxDialogBase::IsEscapeKey(const wxKeyEvent& event)