]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
wxTopLevelWindows is now a wxWindowList, better compatibility with the old
[wxWidgets.git] / src / msw / treectrl.cpp
index 0446ef1aed7338bad210da346cec37f326ff4e25..eb6dfc49774a897eaf883c1253c905ccc3225502 100644 (file)
@@ -671,8 +671,10 @@ void wxTreeCtrl::DeleteAllItems()
 
 void wxTreeCtrl::DoExpand(const wxTreeItemId& item, int flag)
 {
-    wxASSERT_MSG( flag == TVE_COLLAPSE || flag == TVE_COLLAPSERESET ||
-                  flag == TVE_EXPAND   || flag == TVE_TOGGLE,
+    wxASSERT_MSG( flag == TVE_COLLAPSE ||
+                  flag == (TVE_COLLAPSE | TVE_COLLAPSERESET) ||
+                  flag == TVE_EXPAND   ||
+                  flag == TVE_TOGGLE,
                   "Unknown flag in wxTreeCtrl::DoExpand" );
 
     // TreeView_Expand doesn't send TVN_ITEMEXPAND(ING) messages, so we must
@@ -712,7 +714,7 @@ void wxTreeCtrl::Collapse(const wxTreeItemId& item)
 
 void wxTreeCtrl::CollapseAndReset(const wxTreeItemId& item)
 {
-    DoExpand(item, TVE_COLLAPSERESET);
+    DoExpand(item, TVE_COLLAPSE | TVE_COLLAPSERESET);
 }
 
 void wxTreeCtrl::Toggle(const wxTreeItemId& item)