Commit f9e70d8b authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Remove only the necessary selections when setting the item count.

parent 28a2f193
......@@ -6527,7 +6527,12 @@ static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFl
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
INT nOldCount = infoPtr->nItemCount;
LISTVIEW_DeselectAll(infoPtr);
if (nItems < nOldCount)
{
RANGE range = { nItems, nOldCount };
ranges_del(infoPtr->selectionRanges, range);
}
infoPtr->nItemCount = nItems;
LISTVIEW_UpdateScroll(infoPtr);
......
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