]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename property pending for deletion so it won't be in the way of the user code
authorJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 22 Feb 2010 17:04:18 +0000 (17:04 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 22 Feb 2010 17:04:18 +0000 (17:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgridpagestate.cpp

index 5571a46b5b0ce24c1d8be979800fdb3982242872..fa771dc7f1701c6e657d06fe65a2323e27057c05 100644 (file)
@@ -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;
     }