]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
added empty virtual dtors to silence gcc warnings
[wxWidgets.git] / src / common / wincmn.cpp
index 7d16c18b26dda0d56cbf6e36a2770294019c2575..2c79fc55e6d5799307f414956ac0e7f0c2066e8d 100644 (file)
@@ -292,6 +292,18 @@ wxWindowBase::~wxWindowBase()
 
     wxASSERT_MSG( GetChildren().GetCount() == 0, wxT("children not destroyed") );
 
+    // reset the top-level parent's default item if it is this widget
+    if ( m_parent )
+    {
+        wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent((wxWindow*)this),
+                                              wxTopLevelWindow);
+        
+        if ( tlw && tlw->GetDefaultItem() == this )
+            tlw->SetDefaultItem(NULL);
+        if ( tlw && tlw->GetTmpDefaultItem() == this )
+            tlw->SetTmpDefaultItem(NULL);
+    }
+
     // reset the dangling pointer our parent window may keep to us
     if ( m_parent )
     {
@@ -2971,6 +2983,7 @@ wxAccStatus wxWindowAccessible::GetFocus(int* WXUNUSED(childId), wxAccessible**
     return wxACC_NOT_IMPLEMENTED;
 }
 
+#if wxUSE_VARIANT
 // Gets a variant representing the selected children
 // of this object.
 // Acceptable values:
@@ -2987,6 +3000,7 @@ wxAccStatus wxWindowAccessible::GetSelections(wxVariant* WXUNUSED(selections))
 
     return wxACC_NOT_IMPLEMENTED;
 }
+#endif // wxUSE_VARIANT
 
 #endif // wxUSE_ACCESSIBILITY