diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 9a018ae2b7..4b1a5c3386 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3383,6 +3383,7 @@ void GLCanvas3D::do_move(const std::string& snapshot_type) m_selection.translate(i.first, i.second, shift); m->translate_instance(i.second, shift); } + wxGetApp().obj_list()->update_info_items(static_cast(i.first)); } // if the selection is not valid to allow for layer editing after the move, we need to turn off the tool if it is running @@ -3463,6 +3464,7 @@ void GLCanvas3D::do_rotate(const std::string& snapshot_type) m_selection.translate(i.first, i.second, shift); m->translate_instance(i.second, shift); } + wxGetApp().obj_list()->update_info_items(static_cast(i.first)); } if (!done.empty()) @@ -3530,6 +3532,7 @@ void GLCanvas3D::do_scale(const std::string& snapshot_type) m_selection.translate(i.first, i.second, shift); m->translate_instance(i.second, shift); } + wxGetApp().obj_list()->update_info_items(static_cast(i.first)); } if (!done.empty()) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index a013b8dd23..834e45898d 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2386,15 +2386,28 @@ void ObjectList::part_selection_changed() if (type == itInfo) { InfoItemType info_type = m_objects_model->GetInfoItemType(item); - if (info_type != InfoItemType::VariableLayerHeight) { + switch (info_type) + { + case InfoItemType::VariableLayerHeight: + { + wxGetApp().plater()->toggle_layers_editing(true); + break; + } + case InfoItemType::CustomSupports: + case InfoItemType::CustomSeam: + case InfoItemType::MmuSegmentation: + { GLGizmosManager::EType gizmo_type = info_type == InfoItemType::CustomSupports ? GLGizmosManager::EType::FdmSupports : - info_type == InfoItemType::CustomSeam ? GLGizmosManager::EType::Seam : - GLGizmosManager::EType::MmuSegmentation; + info_type == InfoItemType::CustomSeam ? GLGizmosManager::EType::Seam : + GLGizmosManager::EType::MmuSegmentation; GLGizmosManager& gizmos_mgr = wxGetApp().plater()->canvas3D()->get_gizmos_manager(); if (gizmos_mgr.get_current_type() != gizmo_type) gizmos_mgr.open_gizmo(gizmo_type); - } else - wxGetApp().plater()->toggle_layers_editing(true); + break; + } + case InfoItemType::Sinking: { break; } + default: { break; } + } } } else { @@ -2520,6 +2533,7 @@ void ObjectList::update_info_items(size_t obj_idx) for (InfoItemType type : {InfoItemType::CustomSupports, InfoItemType::CustomSeam, InfoItemType::MmuSegmentation, + InfoItemType::Sinking, InfoItemType::VariableLayerHeight}) { wxDataViewItem item = m_objects_model->GetInfoItemByType(item_obj, type); bool shows = item.IsOk(); @@ -2542,6 +2556,13 @@ void ObjectList::update_info_items(size_t obj_idx) should_show = printer_technology() == ptFFF && ! model_object->layer_height_profile.empty(); break; + case InfoItemType::Sinking: + { + const BoundingBoxf3& box = model_object->bounding_box(); + should_show = printer_technology() == ptFFF && + box.min.z() < SINKING_Z_THRESHOLD && box.max.z() > SINKING_Z_THRESHOLD; + break; + } default: break; } diff --git a/src/slic3r/GUI/ObjectDataViewModel.cpp b/src/slic3r/GUI/ObjectDataViewModel.cpp index 3eb0cd5c9b..9f48bcc3ce 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.cpp +++ b/src/slic3r/GUI/ObjectDataViewModel.cpp @@ -65,6 +65,7 @@ ObjectDataViewModelNode::ObjectDataViewModelNode(ObjectDataViewModelNode* parent m_name = info_type == InfoItemType::CustomSupports ? _L("Paint-on supports") : info_type == InfoItemType::CustomSeam ? _L("Paint-on seam") : info_type == InfoItemType::MmuSegmentation ? _L("Paint-on segmentation") : + info_type == InfoItemType::Sinking ? _L("Sinking") : _L("Variable layer height"); m_info_item_type = info_type; } diff --git a/src/slic3r/GUI/ObjectDataViewModel.hpp b/src/slic3r/GUI/ObjectDataViewModel.hpp index da251ef849..1cf10faf53 100644 --- a/src/slic3r/GUI/ObjectDataViewModel.hpp +++ b/src/slic3r/GUI/ObjectDataViewModel.hpp @@ -51,6 +51,7 @@ enum class InfoItemType CustomSupports, CustomSeam, MmuSegmentation, + Sinking, VariableLayerHeight };