Commit c2a7535e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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.
parent bfe6695d
...@@ -2834,6 +2834,8 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr) ...@@ -2834,6 +2834,8 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr)
nItemWidth += WIDTH_PADDING; nItemWidth += WIDTH_PADDING;
} }
TRACE("nItemWidth=%d\n", nItemWidth);
return nItemWidth; return nItemWidth;
} }
...@@ -7476,7 +7478,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, ...@@ -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); 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 ); nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems );
if (nItem == -1) goto fail; 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 */ /* shift indices first so they don't get tangled */
LISTVIEW_ShiftIndices(infoPtr, nItem, 1); LISTVIEW_ShiftIndices(infoPtr, nItem, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment