Ownerdata listviews were not clearing previously selected items when a
new item is set as selected using SetItem and the listview has
LVIS_SINGLESEL.
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 1c03f39..f77dfbd 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2549,7 +2549,13 @@
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);