Small fix for TreeView SortChildren ...

Tim Segall tim at cobber.com
Mon Feb 17 08:29:31 CST 2003


Currently TREEVIEW_Sort complains if the parent is NULL.  Under Windows 
it happily sorts
from the root if the parent is NULL.  This change brings Wine into 
alignment with the Windows behavior.

Tim.

Changelog:
    Accept either TVI_ROOT or NULL for the parent to imply sort the 
entire tree.


--- dlls/comctl32/treeview.c    8 Jan 2003 21:09:27 -0000    1.113
+++ dlls/comctl32/treeview.c    17 Feb 2003 13:39:19 -0000
@@ -2933,8 +2933,8 @@
     PFNDPACOMPARE pfnCompare;
     LPARAM lpCompare;
 
-    /* undocumented feature: TVI_ROOT means `sort the whole tree' */
-    if (parent == TVI_ROOT)
+    /* undocumented feature: TVI_ROOT or NULL means `sort the whole 
tree' */
+    if (parent == TVI_ROOT || parent == NULL)
     parent = infoPtr->root;
 
     /* Check for a valid handle to the parent item */
 




More information about the wine-patches mailing list