From: Zhaoyi zhaoyi@uniontech.com
bNoItemMetrics should be reset to TRUE after calling LISTVIEW_DeleteAllItems().
Signed-off-by: Zhaoyi zhaoyi@uniontech.com --- dlls/comctl32/listview.c | 1 + dlls/comctl32/tests/listview.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 750e447dbef..7972be9669d 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -5590,6 +5590,7 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy) LISTVIEW_UpdateScroll(infoPtr); } LISTVIEW_InvalidateList(infoPtr); + infoPtr->bNoItemMetrics = TRUE;
return TRUE; } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 6dfa672220e..8952b9a744b 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -7254,7 +7254,7 @@ static void test_LVM_DELETEALLITEMS(void) ok(ret, "Unexpected return value %d.\n", ret);
infoPtr_after = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0); - todo_wine ok(infoPtr_after->bNoItemMetrics, "Got Unexpected value %d.\n", infoPtr_after->bNoItemMetrics); + ok(infoPtr_after->bNoItemMetrics, "Got Unexpected value %d.\n", infoPtr_after->bNoItemMetrics);
ReleaseDC(hwnd, hdc);