Initialize listview item size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux