X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6045f99ba2bf267172a11f262fea8dedb0a75ee..8e72b8b51770b59a83eb32f4d766b89f6c4dc615:/src/motif/button.cpp?ds=inline 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