]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved property unattachment code from wxPropertyGridInterface::RemoveProperty() to...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 4 Mar 2010 15:09:15 +0000 (15:09 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 4 Mar 2010 15:09:15 +0000 (15:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgridiface.cpp
src/propgrid/propgridpagestate.cpp

index 99bf2dd80ca95f16a20fd1dec179628b6b68cc65..d29e2f44986dfcc144451825445586d135bb7513 100644 (file)
@@ -166,10 +166,6 @@ wxPGProperty* wxPropertyGridInterface::RemoveProperty( wxPGPropArg id )
 
     state->DoDelete( p, false );
 
-    // Mark the property as 'unattached'
-    p->m_parentState = NULL;
-    p->m_parent = NULL;
-
     RefreshGrid(state);
 
     return p;
index fa771dc7f1701c6e657d06fe65a2323e27057c05..cf059678a0ab08cda76ca38f74d7713e0b63522c 100644 (file)
@@ -1979,6 +1979,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;