From: Jaakko Salli Date: Fri, 31 Jul 2009 14:03:42 +0000 (+0000) Subject: In wxPropertyGridPageState::DoDelete(), clear grid's m_propHover if it matches the... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4d18ddc7bf2896d7dce1bb404c741dbc90cfe8aa?ds=inline In wxPropertyGridPageState::DoDelete(), clear grid's m_propHover if it matches the property being deleted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 1861b67ef6..57668950d1 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1780,6 +1780,12 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) (parent->IsCategory() || parent->IsRoot()) ) m_dictName.erase(item->GetBaseName()); + wxPropertyGrid* pg = GetGrid(); + + // We need to clear parent grid's m_propHover, if it matches item + if ( pg && pg->m_propHover == item ) + pg->m_propHover = NULL; + // We can actually delete it now if ( doDelete ) delete item;