X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bcd055ae108a30299fa278f3fe774f52414eb3df..8e72b8b51770b59a83eb32f4d766b89f6c4dc615:/src/motif/button.cpp diff --git a/src/motif/button.cpp b/src/motif/button.cpp index eb0af12804..645f99cf44 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -17,6 +17,8 @@ #define XtDisplay XTDISPLAY #endif +#include "wx/defs.h" + #include "wx/button.h" #include "wx/utils.h" #include "wx/panel.h" @@ -108,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