Initialize listview item size.

Duane Clark dclark at akamail.com
Mon Feb 3 10:58:42 CST 2003


This is a separate bug from the other listview patches. If an app sends 
a LISTVIEW_Paint to a new listview before adding any items (which an app 
was :-) the item size was not getting set, causing subsequent 
LISTVIEW_Paint calls to clip the painting.

Changelog:
	Make sure item size is initialized when the first item is added.

-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.338
diff -u -r1.338 listview.c
--- dlls/comctl32/listview.c	24 Jan 2003 00:54:59 -0000	1.338
+++ dlls/comctl32/listview.c	3 Feb 2003 16:50:05 -0000
@@ -5809,6 +5809,8 @@
     nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems );
     if (nItem == -1) goto fail;
     infoPtr->nItemCount++;
+    if (infoPtr->nItemCount == 1)
+        LISTVIEW_UpdateItemSize(infoPtr);
   
     /* set the item attributes */ 
     item = *lpLVItem;


More information about the wine-patches mailing list