Module: wine Branch: master Commit: 1d265bcac2188ab14215af049c043ff7c9f31785 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d265bcac2188ab14215af049c...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Thu Jul 16 17:34:54 2009 +0900
comctl32: Explicitly initialize visible order of a newly added item, force visible order recalculation on redraw.
---
dlls/comctl32/treeview.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index fd20cef..8155aab 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1255,6 +1255,7 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i
newItem->parent = parentItem; newItem->iIntegral = 1; + newItem->visibleOrder = -1;
if (!TREEVIEW_DoSetItemT(infoPtr, newItem, tvItem, isW)) return 0; @@ -1394,8 +1395,6 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i } else { - newItem->visibleOrder = -1; - /* refresh treeview if newItem is the first item inserted under parentItem */ if (ISVISIBLE(parentItem) && newItem->prevSibling == newItem->nextSibling) { @@ -1594,6 +1593,7 @@ TREEVIEW_SetRedraw(TREEVIEW_INFO* infoPtr, WPARAM wParam) if (infoPtr->bRedraw) { TREEVIEW_UpdateSubTree(infoPtr, infoPtr->root); + TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL); TREEVIEW_UpdateScrollBars(infoPtr); TREEVIEW_Invalidate(infoPtr, NULL); }