Commit 59e59c6b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/listview: Don't alter selection mark in LVM_SETITEMSTATE.

parent 092263f0
......@@ -8118,39 +8118,6 @@ static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE
else
bResult = LISTVIEW_SetItemT(infoPtr, &lvItem, TRUE);
/*
* Update selection mark
*
* Investigation on windows 2k showed that selection mark was updated
* whenever a new selection was made, but if the selected item was
* unselected it was not updated.
*
* we are probably still not 100% accurate, but this at least sets the
* proper selection mark when it is needed
*/
if (bResult && (lvItem.state & lvItem.stateMask & LVIS_SELECTED) &&
(infoPtr->nSelectionMark == -1))
{
int i;
for (i = 0; i < infoPtr->nItemCount; i++)
{
if (infoPtr->uCallbackMask & LVIS_SELECTED)
{
if (LISTVIEW_GetItemState(infoPtr, i, LVIS_SELECTED))
{
infoPtr->nSelectionMark = i;
break;
}
}
else if (ranges_contain(infoPtr->selectionRanges, i))
{
infoPtr->nSelectionMark = i;
break;
}
}
}
return bResult;
}
......
......@@ -1990,7 +1990,6 @@ static void test_multiselect(void)
r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
expect(3, r);
r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0);
todo_wine
expect(-1, r);
style = GetWindowLongPtrA(hwnd, GWL_STYLE);
......@@ -2022,7 +2021,6 @@ todo_wine
r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0);
expect(1, r);
r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0);
todo_wine
expect(-1, r);
/* try to select all on LVS_SINGLESEL */
......
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