Remove only the necessary selections when setting the item count.
This commit is contained in:
parent
28a2f193a3
commit
f9e70d8b81
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue