X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6045f99ba2bf267172a11f262fea8dedb0a75ee..adb45366da2cb1ee72f548ab2fa149f071327682:/src/motif/button.cpp?ds=sidebyside diff --git a/src/motif/button.cpp b/src/motif/button.cpp index f9a139b068..645f99cf44 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -110,9 +110,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, void wxButton::SetDefault() { wxWindow *parent = GetParent(); - wxPanel *panel = wxDynamicCast(parent, wxPanel); - if ( panel ) - panel->SetDefaultItem(this); + if ( parent ) + parent->SetDefaultItem(this); // We initially do not set XmNdefaultShadowThickness, to have small buttons. // Unfortunately, buttons are now mis-aligned. We try to correct this