X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/461a37f596c27c84af5868c6072c07eb344c536c..e7ca6139d062c37cc7c056b6647097e999b714cd:/src/mac/button.cpp?ds=sidebyside diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 03ce6f1b29..83cdba79e0 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -50,12 +50,11 @@ void wxButton::SetDefault() { wxWindow *parent = GetParent(); wxButton *btnOldDefault = NULL; - wxPanel *panel = wxDynamicCast(parent, wxPanel); - if ( panel ) + if ( parent ) { - btnOldDefault = wxDynamicCast(panel->GetDefaultItem(), + btnOldDefault = wxDynamicCast(parent->GetDefaultItem(), wxButton); - panel->SetDefaultItem(this); + parent->SetDefaultItem(this); } Boolean inData;