When removing focus, no need to go through all elements.

This commit is contained in:
Dimitrie O. Paun 2002-10-21 19:40:26 +00:00 committed by Alexandre Julliard
parent feb326118f
commit e37692bd33
1 changed files with 1 additions and 1 deletions

View File

@ -2608,7 +2608,7 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem)
lvItem.state = nItem == -1 ? 0 : LVIS_FOCUSED; lvItem.state = nItem == -1 ? 0 : LVIS_FOCUSED;
lvItem.stateMask = LVIS_FOCUSED; lvItem.stateMask = LVIS_FOCUSED;
LISTVIEW_SetItemState(infoPtr, nItem, &lvItem); LISTVIEW_SetItemState(infoPtr, nItem == -1 ? infoPtr->nFocusedItem : nItem, &lvItem);
return oldFocus != infoPtr->nFocusedItem; return oldFocus != infoPtr->nFocusedItem;
} }