Ownerdata listviews were not clearing previously selected items when a

new item is set as selected using SetItem and the listview has
LVIS_SINGLESEL.
This commit is contained in:
Aric Stewart 2000-11-29 00:00:11 +00:00 committed by Alexandre Julliard
parent b7b4fd03df
commit 147bc6d21b
1 changed files with 6 additions and 0 deletions

View File

@ -2549,7 +2549,13 @@ static BOOL LISTVIEW_SetItem(HWND hwnd, LPLVITEMA lpLVItem)
if (lpLVItem->stateMask & LVIS_SELECTED)
{
if (lpLVItem->state & LVIS_SELECTED)
{
if (lStyle & LVS_SINGLESEL)
{
LISTVIEW_RemoveAllSelections(hwnd);
}
LISTVIEW_AddSelectionRange(hwnd,lpLVItem->iItem,lpLVItem->iItem);
}
else
LISTVIEW_RemoveSelectionRange(hwnd,lpLVItem->iItem,
lpLVItem->iItem);