]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/button.cpp
fixes for Raise() to work correctly with both top level and child windows
[wxWidgets.git] / src / mac / carbon / button.cpp
index 363789a94521f979fce8ee9dfeba079f9c44fee1..e8a9b079b62e2aef6f56e8e6326d68e208356ce2 100644 (file)
@@ -53,7 +53,8 @@ void wxButton::SetDefault()
     wxPanel *panel = wxDynamicCast(parent, wxPanel);
     if ( panel )
     {
-        btnOldDefault = panel->GetDefaultItem();
+        btnOldDefault = wxDynamicCast(panel->GetDefaultItem(),
+           wxButton);
         panel->SetDefaultItem(this);
     }