ObjectDataViewModel: Fixed AddInfoChild() and Delete() functions

Delete () function did not account for InfoItems that were added before VolumeItems
As a result, There was possibility when deletion of penult VolumeItem wasn't invoke deletion of the last VolumeItem

AddInfoChild() was not respect to existed SettingsItem
SettingsItem have to be on a first place always.
This commit is contained in:
YuSanka 2021-09-09 17:50:14 +02:00
parent 9c5c9a0e78
commit 0abab45efa
2 changed files with 35 additions and 34 deletions

View file

@ -279,6 +279,7 @@ public:
const t_layer_height_range& layer_range,
const int extruder = 0,
const int index = -1);
size_t GetItemIndexForFirstVolume(ObjectDataViewModelNode* node_parent);
wxDataViewItem Delete(const wxDataViewItem &item);
wxDataViewItem DeleteLastInstance(const wxDataViewItem &parent_item, size_t num);
void DeleteAll();