From: Jaakko Salli Date: Mon, 22 Feb 2010 17:04:18 +0000 (+0000) Subject: Rename property pending for deletion so it won't be in the way of the user code X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9493cc02eede0959c3cc121729e017ad1bf253b1 Rename property pending for deletion so it won't be in the way of the user code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 5571a46b5b..fa771dc7f1 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1866,6 +1866,18 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) pg->m_deletedProperties.push_back(item); else pg->m_removedProperties.push_back(item); + + // Rename the property so it won't remain in the way + // of the user code. + + // Let's trust that no sane property uses prefix like + // this. It would be anyway fairly inconvenient (in + // current code) to check whether a new name is used + // by another property with parent (due to the child + // name notation). + wxString newName = wxS("_&/_%$") + item->GetBaseName(); + DoSetPropertyName(item, newName); + return; }