another minor fix for wxTR_HIDE_ROOT case

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-03-16 15:28:04 +00:00
parent 11ab1dfbfe
commit efa3835048

View File

@ -303,27 +303,24 @@ struct wxTreeViewItem : public TV_ITEM
// wxVirutalNode is used in place of a single root when 'hidden' root is
// specified.
class wxVirtualNode
class wxVirtualNode : public wxTreeViewItem
{
public:
wxVirtualNode(wxTreeItemData *data)
: wxTreeViewItem(TVI_ROOT, 0)
{
m_data = data;
m_tvItem = new wxTreeViewItem(TVI_ROOT, 0);
}
~wxVirtualNode()
{
delete m_data;
delete m_tvItem;
}
wxTreeItemData *GetData() const { return m_data; }
void SetData(wxTreeItemData *data) { delete m_data; m_data = data; }
private:
wxTreeViewItem *m_tvItem;
wxTreeItemData *m_data;
};