mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Fixed ObjectList::last_volume_is_deleted() to avoid clearing volume[0].config after undo/redo
This commit is contained in:
@@ -1741,7 +1741,7 @@ void ObjectList::del_subobject_item(wxDataViewItem& item)
|
||||
ItemType type;
|
||||
|
||||
m_objects_model->GetItemInfo(item, type, obj_idx, idx);
|
||||
if (type & itUndef)
|
||||
if (type == itUndef)
|
||||
return;
|
||||
|
||||
if (type & itSettings)
|
||||
@@ -3101,7 +3101,7 @@ void ObjectList::change_part_type()
|
||||
void ObjectList::last_volume_is_deleted(const int obj_idx)
|
||||
{
|
||||
|
||||
if (obj_idx < 0 || obj_idx >= m_objects->size() || (*m_objects)[obj_idx]->volumes.empty())
|
||||
if (obj_idx < 0 || obj_idx >= m_objects->size() || (*m_objects)[obj_idx]->volumes.size() != 1)
|
||||
return;
|
||||
|
||||
auto volume = (*m_objects)[obj_idx]->volumes.front();
|
||||
|
||||
Reference in New Issue
Block a user