don't allow multiple root in the tree
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1198,6 +1198,10 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent,
|
||||
int image, int selectedImage,
|
||||
wxTreeItemData *data)
|
||||
{
|
||||
wxCHECK_MSG( parent.IsOk() || !TreeView_GetRoot(GetHwnd()),
|
||||
wxTreeItemId(),
|
||||
_T("can't have more than one root in the tree") );
|
||||
|
||||
TV_INSERTSTRUCT tvIns;
|
||||
tvIns.hParent = HITEM(parent);
|
||||
tvIns.hInsertAfter = HITEM(hInsertAfter);
|
||||
|
Reference in New Issue
Block a user