]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/control.cpp
Replaced 'erase' with $(RM) so that the default file deletion program can be overriden
[wxWidgets.git] / src / motif / control.cpp
index 310c2c686195d0a412b4bc313d413d7f2e302c41..6413b921032581ae73b298930b3361a8414707db 100644 (file)
@@ -66,12 +66,8 @@ wxControl::~wxControl()
 {
     // If we delete an item, we should initialize the parent panel,
     // because it could now be invalid.
-    wxPanel *panel = wxDynamicCast(GetParent(), wxPanel);
-    if (panel)
-    {
-        if ( (wxControl *)panel->GetDefaultItem() == this)
-            panel->SetDefaultItem((wxButton*) NULL);
-    }
+    if ( GetParent()->panel->GetDefaultItem() == this)
+        panel->SetDefaultItem(NULL);
 }
 
 void wxControl::SetLabel(const wxString& label)