Re: wine/dlls/comctl32 listview.c

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

 



On February 12, 2003 11:49 am, Rein Klazes wrote:
> This causes a rgeression in newsbin. The listview with the headers do
> not update during a "retrieve all headers".

Indeed. Thanks for the bug report. Please give this a shot, it should
fix it.

ChangeLog
  Correctly remember the first paint event, but delay item metrics
  calculation until we actually have some items.

Index: dlls/comctl32/listview.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/listview.c,v
retrieving revision 1.339
diff -u -r1.339 listview.c
--- dlls/comctl32/listview.c	11 Feb 2003 22:17:31 -0000	1.339
+++ dlls/comctl32/listview.c	14 Feb 2003 01:09:10 -0000
@@ -226,6 +226,7 @@
   HIMAGELIST himlState;
   BOOL bLButtonDown;
   BOOL bRButtonDown;
+  BOOL bNoItemMetrics;		/* flags if item metrics are not yet computed */
   INT nItemHeight;
   INT nItemWidth;
   RANGES selectionRanges;
@@ -7032,6 +7033,7 @@
   infoPtr->nHotItem = -1;
   infoPtr->bRedraw = TRUE;
   infoPtr->bFirstPaint = TRUE;
+  infoPtr->bNoItemMetrics = TRUE;
   infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING);
   infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING);
   infoPtr->nEditLabelItem = -1;
@@ -7850,11 +7852,12 @@
 {
     TRACE("(hdc=%p)\n", hdc);
 
-    if (infoPtr->bFirstPaint && infoPtr->nItemCount)
+    infoPtr->bFirstPaint = FALSE;
+    if (infoPtr->bNoItemMetrics && infoPtr->nItemCount)
     {
 	UINT uView =  infoPtr->dwStyle & LVS_TYPEMASK;
 	
-	infoPtr->bFirstPaint = FALSE;
+	infoPtr->bNoItemMetrics = FALSE;
 	LISTVIEW_UpdateItemSize(infoPtr);
 	if (uView == LVS_ICON || uView == LVS_SMALLICON)
 	    LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);


-- 
Dimi.



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

  Powered by Linux