assert if AddRoot() is called twice for a wxTR_HIDE_ROOT tree
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
4f0cd9b61e
commit
2a69b4e849
@ -1481,9 +1481,10 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
|
||||
int image, int selectedImage,
|
||||
wxTreeItemData *data)
|
||||
{
|
||||
|
||||
if ( HasFlag(wxTR_HIDE_ROOT) )
|
||||
{
|
||||
wxASSERT_MSG( !m_pVirtualRoot, _T("tree can have only a single root") );
|
||||
|
||||
// create a virtual root item, the parent for all the others
|
||||
wxTreeItemParam *param = new wxTreeItemParam;
|
||||
param->SetData(data);
|
||||
|
Loading…
Reference in New Issue
Block a user