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:
Artur Wieczorek
2014-10-25 12:35:14 +00:00
parent 743aa6d74f
commit fd9d67e9f4

View File

@@ -290,16 +290,10 @@ void wxPropertyGridPageState::DoClear()
// deleted individually (and with deferral).
if ( m_pPropGrid && m_pPropGrid->m_processedEvent )
{
wxPropertyGridIterator it;
for ( it = wxPropertyGridIterator(this, wxPG_ITERATE_ALL, wxNullProperty);
!it.AtEnd();
it++ )
for (unsigned int i = 0; i < m_regularArray.GetChildCount(); i++)
{
wxPGProperty *p = *it;
// 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);
wxPGProperty* p = m_regularArray.Item(i);
DoDelete(p, true);
}
}
else