X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6045f99ba2bf267172a11f262fea8dedb0a75ee..08c4a8a9dd5d6f50a99aeca0999c7ae682ae76e5:/src/motif/button.cpp 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