]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgridpagestate.cpp
Don't use invoking window in wxGTK wxMenuBar implementation.
[wxWidgets.git] / src / propgrid / propgridpagestate.cpp
index fa771dc7f1701c6e657d06fe65a2323e27057c05..1279370d12641d57afdefe58823f3e23d0bed06d 100644 (file)
@@ -1397,18 +1397,7 @@ bool wxPropertyGridPageState::DoSelectProperty( wxPGProperty* p, unsigned int fl
 
 bool wxPropertyGridPageState::DoHideProperty( wxPGProperty* p, bool hide, int flags )
 {
-    if ( !hide )
-        p->ClearFlag( wxPG_PROP_HIDDEN );
-    else
-        p->SetFlag( wxPG_PROP_HIDDEN );
-
-    if ( flags & wxPG_RECURSE )
-    {
-        unsigned int i;
-        for ( i = 0; i < p->GetChildCount(); i++ )
-            DoHideProperty(p->Item(i), hide, flags | wxPG_RECURSE_STARTS);
-    }
-
+    p->DoHide(hide, flags);
     VirtualHeightChanged();
 
     return true;
@@ -1979,6 +1968,10 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
     if ( pg && pg->m_propHover == item )
         pg->m_propHover = NULL;
 
+    // Mark the property as 'unattached'
+    item->m_parentState = NULL;
+    item->m_parent = NULL;
+
     // We can actually delete it now
     if ( doDelete )
         delete item;