mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
Added "Add/Delete" functions to the MyObjectTreeModel
This commit is contained in:
parent
45b6c99353
commit
db7c58009c
3 changed files with 76 additions and 28 deletions
|
@ -209,13 +209,17 @@ class MyObjectTreeModel :public wxDataViewModel
|
|||
{
|
||||
std::set<MyObjectTreeModelNode*> m_objects;
|
||||
public:
|
||||
MyObjectTreeModel();
|
||||
MyObjectTreeModel(){}
|
||||
~MyObjectTreeModel()
|
||||
{
|
||||
for (auto object : m_objects)
|
||||
delete object;
|
||||
}
|
||||
|
||||
void Add(wxString &name);
|
||||
void AddChild(const wxDataViewItem &parent_item, wxString &name);
|
||||
void Delete(const wxDataViewItem &item);
|
||||
|
||||
// helper method for wxLog
|
||||
|
||||
wxString GetName(const wxDataViewItem &item) const;
|
||||
|
@ -224,10 +228,6 @@ public:
|
|||
|
||||
// helper methods to change the model
|
||||
|
||||
// void AddToClassical(const wxString &title, const wxString &artist,
|
||||
// unsigned int year);
|
||||
// void Delete(const wxDataViewItem &item);
|
||||
|
||||
virtual unsigned int GetColumnCount() const override { return 3;}
|
||||
virtual wxString GetColumnType(unsigned int col) const override{ return wxT("string"); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue