X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5f005cc9385455ceebdf2063aa7f421f70315d1..f68c6b523c1117c90c1cf690745c807bc024789d:/src/motif/button.cpp?ds=sidebyside diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 645f99cf44..de02890cb2 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -119,10 +119,12 @@ void wxButton::SetDefault() // Because it's very hard to find wxButton in the same row, // correction is straighforward: we set resource for all wxButton // in this parent (but not sub panels) - for (wxNode * node = parent->GetChildren().First (); node; node = node->Next ()) + for (wxWindowList::Node * node = parent->GetChildren().GetFirst (); + node; node = node->GetNext ()) { - wxButton *item = (wxButton *) node->Data (); - if (item->IsKindOf(CLASSINFO(wxButton))) + wxWindow *win = node->GetData (); + wxButton *item = wxDynamicCast(win, wxButton); + if (item) { bool managed = XtIsManaged((Widget) item->GetMainWidget()); if (managed)