Get wxPGProperty items to be deleted with deferral directly from the corresponding internal list of items.
Don't use iterator to collect wxPGProperty items in wxPropertyGridPageState::DoClear(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -290,15 +290,9 @@ void wxPropertyGridPageState::DoClear()
|
|||||||
// deleted individually (and with deferral).
|
// deleted individually (and with deferral).
|
||||||
if ( m_pPropGrid && m_pPropGrid->m_processedEvent )
|
if ( m_pPropGrid && m_pPropGrid->m_processedEvent )
|
||||||
{
|
{
|
||||||
wxPropertyGridIterator it;
|
for (unsigned int i = 0; i < m_regularArray.GetChildCount(); i++)
|
||||||
for ( it = wxPropertyGridIterator(this, wxPG_ITERATE_ALL, wxNullProperty);
|
|
||||||
!it.AtEnd();
|
|
||||||
it++ )
|
|
||||||
{
|
{
|
||||||
wxPGProperty *p = *it;
|
wxPGProperty* p = m_regularArray.Item(i);
|
||||||
// Do not attempt to explicitly remove sub-properties.
|
|
||||||
// They will be removed in their parent property dtor.
|
|
||||||
if ( !p->GetParent()->HasFlag(wxPG_PROP_AGGREGATE) )
|
|
||||||
DoDelete(p, true);
|
DoDelete(p, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user