Nikolay Sivov : comctl32/listview: Update item width every time new item is inserted.
Alexandre Julliard
julliard at winehq.org
Wed Dec 9 10:46:28 CST 2009
Module: wine
Branch: master
Commit: c2a7535e9d112989abe687255b4f0da9a597678e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c2a7535e9d112989abe687255b4f0da9a597678e
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed Dec 9 15:17:12 2009 +0300
comctl32/listview: Update item width every time new item is inserted.
This prevents retaining previously stored width and unexpected item
displaying collapsing with ending ellipsis.
---
dlls/comctl32/listview.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 8f6db54..3d32708 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2834,6 +2834,8 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr)
nItemWidth += WIDTH_PADDING;
}
+ TRACE("nItemWidth=%d\n", nItemWidth);
+
return nItemWidth;
}
@@ -7476,7 +7478,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
TRACE(" inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem);
nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems );
if (nItem == -1) goto fail;
- if (infoPtr->nItemCount++ == 0) LISTVIEW_UpdateItemSize(infoPtr);
+ if (++infoPtr->nItemCount > 0) LISTVIEW_UpdateItemSize(infoPtr);
/* shift indices first so they don't get tangled */
LISTVIEW_ShiftIndices(infoPtr, nItem, 1);
More information about the wine-cvs
mailing list