From: Vadim Zeitlin Date: Fri, 7 Jun 2002 20:39:22 +0000 (+0000) Subject: fix tree icon refresh after collapsing a branch (patch 565294) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bf43d750e66d491255c090dd0336c46def997178?ds=inline fix tree icon refresh after collapsing a branch (patch 565294) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 9a393feba7..ffba0255fa 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2572,16 +2572,13 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // an image depending on the expanded/collapsed state - bug in // comctl32.dll or our code? { - NM_TREEVIEW* tv = (NM_TREEVIEW*)lParam; - if ( tv->action == TVE_EXPAND ) - { - wxTreeItemId id = (WXHTREEITEM)tv->itemNew.hItem; + NM_TREEVIEW* tv = (NM_TREEVIEW *)lParam; + wxTreeItemId id = (WXHTREEITEM)tv->itemNew.hItem; - int image = GetItemImage(id, wxTreeItemIcon_Expanded); - if ( image != -1 ) - { - RefreshItem(id); - } + int image = GetItemImage(id, wxTreeItemIcon_Expanded); + if ( image != -1 ) + { + RefreshItem(id); } } break; @@ -2589,7 +2586,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_GETDISPINFO: // NB: so far the user can't set the image himself anyhow, so do it // anyway - but this may change later -// if ( /* !processed && */ 1 ) + //if ( /* !processed && */ 1 ) { wxTreeItemId item = event.m_item; TV_DISPINFO *info = (TV_DISPINFO *)lParam;