mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed crash after deleting of the part with no extruder options in configuration
This commit is contained in:
parent
5ecd78434c
commit
7cced0613a
1 changed files with 2 additions and 1 deletions
|
@ -1761,7 +1761,8 @@ 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)
|
if ((*m_objects)[item->obj_idx]->volumes.size() == 1 &&
|
||||||
|
(*m_objects)[item->obj_idx]->config.has("extruder"))
|
||||||
{
|
{
|
||||||
const wxString extruder = wxString::Format("%d", (*m_objects)[item->obj_idx]->config.option<ConfigOptionInt>("extruder")->value);
|
const wxString extruder = wxString::Format("%d", (*m_objects)[item->obj_idx]->config.option<ConfigOptionInt>("extruder")->value);
|
||||||
m_objects_model->SetValue(extruder, m_objects_model->GetItemById(item->obj_idx), 1);
|
m_objects_model->SetValue(extruder, m_objects_model->GetItemById(item->obj_idx), 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue