Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/comctl32/listbox.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c index a6f7bd5..47c76ad 100644 --- a/dlls/comctl32/listbox.c +++ b/dlls/comctl32/listbox.c @@ -1434,7 +1434,7 @@ static LRESULT LISTBOX_SelectItemRange( LB_DESCR *descr, INT first, { for (i = first; i <= last; i++) { - if (descr->items[i].selected) continue; + if (is_item_selected(descr, i)) continue; descr->items[i].selected = TRUE; LISTBOX_InvalidateItemRect(descr, i); } @@ -1443,7 +1443,7 @@ static LRESULT LISTBOX_SelectItemRange( LB_DESCR *descr, INT first, { for (i = first; i <= last; i++) { - if (!descr->items[i].selected) continue; + if (!is_item_selected(descr, i)) continue; descr->items[i].selected = FALSE; LISTBOX_InvalidateItemRect(descr, i); } @@ -2079,7 +2079,7 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN { LISTBOX_SetCaretIndex( descr, index, FALSE ); LISTBOX_SetSelection( descr, index, - !descr->items[index].selected, + !is_item_selected(descr, index), (descr->style & LBS_NOTIFY) != 0); } else @@ -2089,13 +2089,13 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN if (descr->style & LBS_EXTENDEDSEL) { LISTBOX_SetSelection( descr, index, - descr->items[index].selected, + is_item_selected(descr, index), (descr->style & LBS_NOTIFY) != 0 ); } else { LISTBOX_SetSelection( descr, index, - !descr->items[index].selected, + !is_item_selected(descr, index), (descr->style & LBS_NOTIFY) != 0 ); } } @@ -2415,7 +2415,7 @@ static LRESULT LISTBOX_HandleKeyDown( LB_DESCR *descr, DWORD key ) else if (descr->style & LBS_MULTIPLESEL) { LISTBOX_SetSelection( descr, descr->focus_item, - !descr->items[descr->focus_item].selected, + !is_item_selected(descr, descr->focus_item), (descr->style & LBS_NOTIFY) != 0 ); } break;