[PATCH] Treeview : don't keep deleted item as selected item

Gerard Patel gerard.patel at nerim.net
Sun Aug 19 18:51:56 CDT 2001


When an app is notified of the selection of an item following the deletion
of the current item, it should not receive the (invalid) handle of the deleted
item as the 'prevItem' parameter.

http://wine.codeweavers.com/bugzilla/show_bug.cgi?id=302.

ChangeLog:

	* dlls/comctl32/treeview.c
               Does not keep the handle of a deleted item as the selectedItem.
-------------- next part --------------
Index: dlls/comctl32/treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
retrieving revision 1.93
diff -u -r1.93 treeview.c
--- dlls/comctl32/treeview.c	2001/08/13 20:08:21	1.93
+++ dlls/comctl32/treeview.c	2001/08/19 20:19:35
@@ -838,6 +838,8 @@
 {
     DPA_DeletePtr(infoPtr->items, DPA_GetPtrIndex(infoPtr->items, item));
     COMCTL32_Free(item);
+    if (infoPtr->selectedItem == item)
+        infoPtr->selectedItem = NULL;
 }
 
 
-------------- next part --------------



More information about the wine-patches mailing list