Remove only the necessary selections when setting the item count.

This commit is contained in:
Dimitrie O. Paun 2002-10-28 20:34:00 +00:00 committed by Alexandre Julliard
parent 28a2f193a3
commit f9e70d8b81
1 changed files with 6 additions and 1 deletions

View File

@ -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);