mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 06:51:49 +08:00
Fix for #SPE-1370 - Slicer crash when delete more volumes together
Bug was caused by changes in 13e4e85e3d
So, revert related parts of code.
This commit is contained in:
parent
d9be85fa01
commit
1ba4227633
@ -1864,12 +1864,10 @@ bool ObjectList::del_subobject_item(wxDataViewItem& item)
|
|||||||
|
|
||||||
// If last volume item with warning was deleted, unmark object item
|
// If last volume item with warning was deleted, unmark object item
|
||||||
if (type & itVolume) {
|
if (type & itVolume) {
|
||||||
add_volumes_to_object_in_list(obj_idx);
|
|
||||||
const std::string& icon_name = get_warning_icon_name(object(obj_idx)->get_object_stl_stats());
|
const std::string& icon_name = get_warning_icon_name(object(obj_idx)->get_object_stl_stats());
|
||||||
m_objects_model->UpdateWarningIcon(parent, icon_name);
|
m_objects_model->UpdateWarningIcon(parent, icon_name);
|
||||||
}
|
}
|
||||||
else
|
m_objects_model->Delete(item);
|
||||||
m_objects_model->Delete(item);
|
|
||||||
|
|
||||||
update_info_items(obj_idx);
|
update_info_items(obj_idx);
|
||||||
|
|
||||||
@ -3031,7 +3029,7 @@ bool ObjectList::delete_from_model_and_list(const std::vector<ItemForDelete>& it
|
|||||||
if (!del_subobject_from_object(item->obj_idx, item->sub_obj_idx, item->type))
|
if (!del_subobject_from_object(item->obj_idx, item->sub_obj_idx, item->type))
|
||||||
continue;
|
continue;
|
||||||
if (item->type&itVolume) {
|
if (item->type&itVolume) {
|
||||||
add_volumes_to_object_in_list(item->obj_idx);
|
m_objects_model->Delete(m_objects_model->GetItemByVolumeId(item->obj_idx, item->sub_obj_idx));
|
||||||
ModelObject* obj = object(item->obj_idx);
|
ModelObject* obj = object(item->obj_idx);
|
||||||
if (obj->volumes.size() == 1) {
|
if (obj->volumes.size() == 1) {
|
||||||
wxDataViewItem parent = m_objects_model->GetItemById(item->obj_idx);
|
wxDataViewItem parent = m_objects_model->GetItemById(item->obj_idx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user