Added sinking property item to objects list
This commit is contained in:
parent
a54f5fb41a
commit
14a67b0c9e
4 changed files with 31 additions and 5 deletions
src/slic3r/GUI
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue