mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Changed object list behavior when we have only one part(volume) inside main object
This commit is contained in:
parent
564fa9e4dc
commit
c227dad8cc
4 changed files with 108 additions and 6 deletions
|
@ -422,11 +422,16 @@ private:
|
|||
// PrusaObjectDataViewModel
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// custom message the model sends to associated control to notify a last volume deleted from the object:
|
||||
wxDECLARE_EVENT(wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, wxCommandEvent);
|
||||
|
||||
class PrusaObjectDataViewModel :public wxDataViewModel
|
||||
{
|
||||
std::vector<PrusaObjectDataViewModelNode*> m_objects;
|
||||
std::vector<wxBitmap*> m_volume_bmps;
|
||||
|
||||
wxDataViewCtrl* m_ctrl{ nullptr };
|
||||
|
||||
public:
|
||||
PrusaObjectDataViewModel();
|
||||
~PrusaObjectDataViewModel();
|
||||
|
@ -444,6 +449,7 @@ public:
|
|||
void DeleteAll();
|
||||
void DeleteChildren(wxDataViewItem& parent);
|
||||
void DeleteVolumeChildren(wxDataViewItem& parent);
|
||||
void DeleteSettings(const wxDataViewItem& parent);
|
||||
wxDataViewItem GetItemById(int obj_idx);
|
||||
wxDataViewItem GetItemByVolumeId(int obj_idx, int volume_idx);
|
||||
wxDataViewItem GetItemByInstanceId(int obj_idx, int inst_idx);
|
||||
|
@ -500,6 +506,8 @@ public:
|
|||
|
||||
void SetVolumeBitmaps(const std::vector<wxBitmap*>& volume_bmps) { m_volume_bmps = volume_bmps; }
|
||||
void SetVolumeType(const wxDataViewItem &item, const int type);
|
||||
|
||||
void SetAssociatedControl(wxDataViewCtrl* ctrl) { m_ctrl = ctrl; }
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue