Moved property unattachment code from wxPropertyGridInterface::RemoveProperty() to wxPropertyGridPageState::DoDelete() - fixes deferred removal issue
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -166,10 +166,6 @@ wxPGProperty* wxPropertyGridInterface::RemoveProperty( wxPGPropArg id )
|
|||||||
|
|
||||||
state->DoDelete( p, false );
|
state->DoDelete( p, false );
|
||||||
|
|
||||||
// Mark the property as 'unattached'
|
|
||||||
p->m_parentState = NULL;
|
|
||||||
p->m_parent = NULL;
|
|
||||||
|
|
||||||
RefreshGrid(state);
|
RefreshGrid(state);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
@@ -1979,6 +1979,10 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
|
|||||||
if ( pg && pg->m_propHover == item )
|
if ( pg && pg->m_propHover == item )
|
||||||
pg->m_propHover = NULL;
|
pg->m_propHover = NULL;
|
||||||
|
|
||||||
|
// Mark the property as 'unattached'
|
||||||
|
item->m_parentState = NULL;
|
||||||
|
item->m_parent = NULL;
|
||||||
|
|
||||||
// We can actually delete it now
|
// We can actually delete it now
|
||||||
if ( doDelete )
|
if ( doDelete )
|
||||||
delete item;
|
delete item;
|
||||||
|
|||||||
Reference in New Issue
Block a user