X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9b142c9f8a33853c9183df8304bd6fe8d945964..67e2efca87e3d3142ca545d9855748da15eac894:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 298bd38744..ee2a775b34 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -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; }; @@ -1517,7 +1514,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, return TVI_ROOT; } - return DoInsertItem(wxTreeItemId((WXHTREEITEM) 0), (WXHTREEITEM) 0, + return DoInsertItem(wxTreeItemId((long)(WXHTREEITEM) 0), (long)(WXHTREEITEM) 0, text, image, selectedImage, data); }