Commit 012b7669 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

comctl32/listbox: Repaint the old selected item after setting the item selection.

parent eed36af5
...@@ -1466,8 +1466,8 @@ static LRESULT LISTBOX_SetSelection( LB_DESCR *descr, INT index, ...@@ -1466,8 +1466,8 @@ static LRESULT LISTBOX_SetSelection( LB_DESCR *descr, INT index,
if (index == oldsel) return LB_OKAY; if (index == oldsel) return LB_OKAY;
if (oldsel != -1) descr->items[oldsel].selected = FALSE; if (oldsel != -1) descr->items[oldsel].selected = FALSE;
if (index != -1) descr->items[index].selected = TRUE; if (index != -1) descr->items[index].selected = TRUE;
if (oldsel != -1) LISTBOX_RepaintItem( descr, oldsel, ODA_SELECT );
descr->selected_item = index; descr->selected_item = index;
if (oldsel != -1) LISTBOX_RepaintItem( descr, oldsel, ODA_SELECT );
if (index != -1) LISTBOX_RepaintItem( descr, index, ODA_SELECT ); if (index != -1) LISTBOX_RepaintItem( descr, index, ODA_SELECT );
if (send_notify && descr->nb_items) SEND_NOTIFICATION( descr, if (send_notify && descr->nb_items) SEND_NOTIFICATION( descr,
(index != -1) ? LBN_SELCHANGE : LBN_SELCANCEL ); (index != -1) ? LBN_SELCHANGE : LBN_SELCANCEL );
......
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