Module: wine Branch: refs/heads/master Commit: 53654c6938cc1193301ba1ae9f0d5d5781a8162d URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=53654c6938cc1193301ba1ae...
Author: qingdoa daoo qingdao33122@yahoo.com Date: Tue Apr 25 11:27:29 2006 +0800
comctl32: Update first visible when appropiate in the TVI_SORT case.
---
dlls/comctl32/treeview.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index b333fa3..a6aadf5 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1299,6 +1299,7 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *info { TREEVIEW_ITEM *aChild; TREEVIEW_ITEM *previousChild = NULL; + TREEVIEW_ITEM *originalFirst = parentItem->firstChild; BOOL bItemInserted = FALSE;
aChild = parentItem->firstChild; @@ -1317,6 +1318,9 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *info if (comp < 0) /* we are smaller than the current one */ { TREEVIEW_InsertBefore(newItem, aChild, parentItem); + if (infoPtr->firstVisible == originalFirst && + aChild == originalFirst) + TREEVIEW_SetFirstVisible(infoPtr, newItem, TRUE); bItemInserted = TRUE; break; }