X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6045f99ba2bf267172a11f262fea8dedb0a75ee..120b822df16ae27b64fe73b27d649cb89f166f46:/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