treeview fix

Aric Stewart aric at codeweavers.com
Mon Feb 19 22:00:14 CST 2001


We should insert the item before calling a SetFirstVisible which can
generate a WM_PAINT message.

-aric
-------------- next part --------------
Index: dlls/comctl32/treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
retrieving revision 1.88
diff -u -u -r1.88 treeview.c
--- dlls/comctl32/treeview.c	2001/02/12 18:08:08	1.88
+++ dlls/comctl32/treeview.c	2001/02/20 03:44:44
@@ -1061,9 +1061,9 @@
     switch ((DWORD)insertAfter)
     {
     case (DWORD)TVI_FIRST:
+	TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
 	if (infoPtr->firstVisible == parentItem->firstChild)
 	    TREEVIEW_SetFirstVisible(infoPtr, newItem, TRUE);
-	TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
 	break;
 
     case (DWORD)TVI_LAST:


More information about the wine-patches mailing list