Prevent renaming already renamed wxPG property waiting for deferred deletion.

Name of the property to be deleted with delay is changed to the some meaningless name in order to avoid conflict with other active properties.
It is enough to do this only once.

See #16617

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Artur Wieczorek
2014-10-16 22:33:33 +00:00
parent b72eb78c96
commit 633b49ef6e

View File

@@ -1875,18 +1875,18 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
// Prevent adding duplicates to the lists.
if ( doDelete )
{
if ( pg->m_deletedProperties.Index(item) == wxNOT_FOUND )
{
if ( pg->m_deletedProperties.Index(item) != wxNOT_FOUND )
return;
pg->m_deletedProperties.push_back(item);
}
}
else
{
if ( pg->m_removedProperties.Index(item) == wxNOT_FOUND )
{
if ( pg->m_removedProperties.Index(item) != wxNOT_FOUND )
return;
pg->m_removedProperties.push_back(item);
}
}
// Rename the property so it won't remain in the way
// of the user code.