When removing focus, no need to go through all elements.
This commit is contained in:
parent
feb326118f
commit
e37692bd33
|
@ -2608,7 +2608,7 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem)
|
|||
|
||||
lvItem.state = nItem == -1 ? 0 : LVIS_FOCUSED;
|
||||
lvItem.stateMask = LVIS_FOCUSED;
|
||||
LISTVIEW_SetItemState(infoPtr, nItem, &lvItem);
|
||||
LISTVIEW_SetItemState(infoPtr, nItem == -1 ? infoPtr->nFocusedItem : nItem, &lvItem);
|
||||
|
||||
return oldFocus != infoPtr->nFocusedItem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue