/////////////////////////////////////////////////////////////////////////////
-// Name: treebase.cpp
+// Name: src/common/treebase.cpp
// Purpose: Base wxTreeCtrl classes
// Author: Julian Smart
// Created: 01/02/97
#include "wx/treectrl.h"
#include "wx/imaglist.h"
+extern WXDLLEXPORT_DATA(const char) wxTreeCtrlNameStr[] = "treeCtrl";
+
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
CollapseAllChildren(idCurr);
}
- // then collapse this element too
- Collapse(item);
+ // then collapse this element too unless it's the hidden root which can't
+ // be collapsed
+ if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
+ Collapse(item);
Thaw();
}