diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 4b7cdf3c2..45d7115e9 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -3951,6 +3951,8 @@ void ObjectList::update_item_error_icon(const int obj_idx, const int vol_idx) co // unmark fixed item only m_objects_model->DeleteWarningIcon(item); } + else + m_objects_model->AddWarningIcon(item); } void ObjectList::msw_rescale() diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp index b8884d995..22b311527 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp @@ -208,7 +208,6 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi // Fix warning icon in object list wxGetApp().obj_list()->update_item_error_icon(obj_index, -1); - wxGetApp().obj_list()->part_selection_changed(); } } diff --git a/src/slic3r/GUI/ObjectDataViewModel.cpp b/src/slic3r/GUI/ObjectDataViewModel.cpp index 3eb0cd5c9..ec09731c5 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.cpp +++ b/src/slic3r/GUI/ObjectDataViewModel.cpp @@ -1696,6 +1696,24 @@ wxBitmap ObjectDataViewModel::GetVolumeIcon(const Slic3r::ModelVolumeType vol_ty return *bmp; } +void ObjectDataViewModel::AddWarningIcon(const wxDataViewItem& item) +{ + if (!item.IsOk()) + return; + ObjectDataViewModelNode *node = static_cast(item.GetID()); + + if (node->GetType() & itObject) { + node->SetBitmap(m_warning_bmp); + return; + } + + if (node->GetType() & itVolume) { + node->SetBitmap(GetVolumeIcon(node->GetVolumeType(), true)); + node->GetParent()->SetBitmap(m_warning_bmp); + return; + } +} + void ObjectDataViewModel::DeleteWarningIcon(const wxDataViewItem& item, const bool unmark_object/* = false*/) { if (!item.IsOk()) diff --git a/src/slic3r/GUI/ObjectDataViewModel.hpp b/src/slic3r/GUI/ObjectDataViewModel.hpp index da251ef84..7d3b132ba 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.hpp +++ b/src/slic3r/GUI/ObjectDataViewModel.hpp @@ -375,6 +375,7 @@ public: wxBitmap GetVolumeIcon(const Slic3r::ModelVolumeType vol_type, const bool is_marked = false); + void AddWarningIcon(const wxDataViewItem& item); void DeleteWarningIcon(const wxDataViewItem& item, const bool unmark_object = false); t_layer_height_range GetLayerRangeByItem(const wxDataViewItem& item) const;