listview notify fix
Aric Stewart
aric at codeweavers.com
Thu Apr 13 14:18:55 CDT 2006
This patch turns 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. I believe this to be correct as msdn
states that when shift-selection you should only get a single notification.
-aric
-------------- next part --------------
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index aa4b782..f5b01bf 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -3108,6 +3108,7 @@ static void LISTVIEW_SetGroupSelection(L
RANGES selection;
LVITEMW item;
ITERATOR i;
+ BOOL bOldChange;
if (!(selection = ranges_create(100))) return;
@@ -3149,12 +3150,19 @@ static void LISTVIEW_SetGroupSelection(L
iterator_destroy(&i);
}
+ bOldChange = infoPtr->bDoChangeNotify;
+ infoPtr->bDoChangeNotify = FALSE;
+
LISTVIEW_DeselectAllSkipItems(infoPtr, selection);
+
+
iterator_rangesitems(&i, selection);
while(iterator_next(&i))
LISTVIEW_SetItemState(infoPtr, i.nItem, &item);
/* this will also destroy the selection */
iterator_destroy(&i);
+
+ infoPtr->bDoChangeNotify = bOldChange;
LISTVIEW_SetItemFocus(infoPtr, nItem);
}
More information about the wine-patches
mailing list