Fix clearing wxPG
Properties deleted immediately in wxPropertyGridPageState::DoClear() should be first removed from the lists of pending deletions. Closes #16617 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
96c301bb71
commit
b10b027423
@ -304,6 +304,23 @@ void wxPropertyGridPageState::DoClear()
|
||||
}
|
||||
else
|
||||
{
|
||||
// Properties which will be deleted immediately
|
||||
// should be removed from the lists of pending deletions.
|
||||
for (unsigned int i = 0; i < m_regularArray.GetChildCount(); i++)
|
||||
{
|
||||
wxPGProperty* p = m_regularArray.Item(i);
|
||||
int index = m_pPropGrid->m_deletedProperties.Index(p);
|
||||
if (index != wxNOT_FOUND)
|
||||
{
|
||||
m_pPropGrid->m_deletedProperties.RemoveAt(index);
|
||||
}
|
||||
index = m_pPropGrid->m_removedProperties.Index(p);
|
||||
if (index != wxNOT_FOUND)
|
||||
{
|
||||
m_pPropGrid->m_removedProperties.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
m_regularArray.Empty();
|
||||
if ( m_abcArray )
|
||||
m_abcArray->Empty();
|
||||
|
Loading…
Reference in New Issue
Block a user