comctl32: Listview notify fix.

Turn off updating for that the unselect and select and then turns it
on for the focus call, this results in 1 edit notify being sent at the
end of the operation.
This commit is contained in:
Aric Stewart 2006-04-13 14:18:55 -05:00 committed by Alexandre Julliard
parent d78a3eec41
commit 097aec39ca
1 changed files with 8 additions and 0 deletions

View File

@ -3046,6 +3046,7 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
RANGES selection; RANGES selection;
LVITEMW item; LVITEMW item;
ITERATOR i; ITERATOR i;
BOOL bOldChange;
if (!(selection = ranges_create(100))) return; if (!(selection = ranges_create(100))) return;
@ -3087,12 +3088,19 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem)
iterator_destroy(&i); iterator_destroy(&i);
} }
bOldChange = infoPtr->bDoChangeNotify;
infoPtr->bDoChangeNotify = FALSE;
LISTVIEW_DeselectAllSkipItems(infoPtr, selection); LISTVIEW_DeselectAllSkipItems(infoPtr, selection);
iterator_rangesitems(&i, selection); iterator_rangesitems(&i, selection);
while(iterator_next(&i)) while(iterator_next(&i))
LISTVIEW_SetItemState(infoPtr, i.nItem, &item); LISTVIEW_SetItemState(infoPtr, i.nItem, &item);
/* this will also destroy the selection */ /* this will also destroy the selection */
iterator_destroy(&i); iterator_destroy(&i);
infoPtr->bDoChangeNotify = bOldChange;
LISTVIEW_SetItemFocus(infoPtr, nItem); LISTVIEW_SetItemFocus(infoPtr, nItem);
} }