mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Fixed a bug with update of the warning icon for object after a deleting of the broken volume
This commit is contained in:
parent
4b5cf004bd
commit
d3ddb1cfa8
1 changed files with 10 additions and 5 deletions
|
@ -2670,11 +2670,16 @@ void ObjectList::delete_from_model_and_list(const std::vector<ItemForDelete>& it
|
||||||
if (item->type&itVolume)
|
if (item->type&itVolume)
|
||||||
{
|
{
|
||||||
m_objects_model->Delete(m_objects_model->GetItemByVolumeId(item->obj_idx, item->sub_obj_idx));
|
m_objects_model->Delete(m_objects_model->GetItemByVolumeId(item->obj_idx, item->sub_obj_idx));
|
||||||
if ((*m_objects)[item->obj_idx]->volumes.size() == 1 &&
|
ModelObject* obj = object(item->obj_idx);
|
||||||
(*m_objects)[item->obj_idx]->config.has("extruder"))
|
if (obj->volumes.size() == 1) {
|
||||||
{
|
wxDataViewItem parent = m_objects_model->GetItemById(item->obj_idx);
|
||||||
const wxString extruder = wxString::Format("%d", (*m_objects)[item->obj_idx]->config.extruder());
|
if (obj->config.has("extruder")) {
|
||||||
m_objects_model->SetExtruder(extruder, m_objects_model->GetItemById(item->obj_idx));
|
const wxString extruder = wxString::Format("%d", obj->config.extruder());
|
||||||
|
m_objects_model->SetExtruder(extruder, parent);
|
||||||
|
}
|
||||||
|
// If last volume item with warning was deleted, unmark object item
|
||||||
|
if (obj->get_mesh_errors_count() == 0)
|
||||||
|
m_objects_model->DeleteWarningIcon(parent);
|
||||||
}
|
}
|
||||||
wxGetApp().plater()->canvas3D()->ensure_on_bed(item->obj_idx);
|
wxGetApp().plater()->canvas3D()->ensure_on_bed(item->obj_idx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue