From: Robert Roebling Date: Sat, 25 Dec 2004 18:27:59 +0000 (+0000) Subject: Deselect a child item on Collapse. Otherwise X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/af3961b35785e210a091edce4a6513942f2a7e1c Deselect a child item on Collapse. Otherwise we end up with 2 selected item even in single selection mode. This is a follow-up to the no-dangling pointer patch and also reflects MSW behaviour. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 8155541026..a75a6d7183 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1511,6 +1511,7 @@ void wxGenericTreeCtrl::ChildrenClosing(wxGenericTreeItem* item) m_select_me = item; } if (item != m_current && IsDescendantOf(item, m_current)) { + m_current->SetHilight( false ); m_current = NULL; m_select_me = item; }