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
|
@ -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<size_t>(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<size_t>(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<size_t>(i.first));
|
||||
}
|
||||
|
||||
if (!done.empty())
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ enum class InfoItemType
|
|||
CustomSupports,
|
||||
CustomSeam,
|
||||
MmuSegmentation,
|
||||
Sinking,
|
||||
VariableLayerHeight
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue