Use Del key to delete custom supports etc. from the object list
This commit is contained in:
parent
08e2e29afd
commit
dd1e1307be
@ -1795,7 +1795,48 @@ void ObjectList::del_subobject_item(wxDataViewItem& item)
|
||||
|
||||
void ObjectList::del_info_item(const int obj_idx, InfoItemType type)
|
||||
{
|
||||
// ToDo lmFIXME :)
|
||||
Plater* plater = wxGetApp().plater();
|
||||
GLCanvas3D* cnv = plater->canvas3D();
|
||||
|
||||
switch (type) {
|
||||
case InfoItemType::CustomSupports:
|
||||
cnv->get_gizmos_manager().reset_all_states();
|
||||
Plater::TakeSnapshot(plater, _L("Remove paint-on supports"));
|
||||
for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes)
|
||||
mv->supported_facets.clear();
|
||||
break;
|
||||
|
||||
case InfoItemType::CustomSeam:
|
||||
cnv->get_gizmos_manager().reset_all_states();
|
||||
Plater::TakeSnapshot(plater, _L("Remove paint-on seam"));
|
||||
for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes)
|
||||
mv->seam_facets.clear();
|
||||
break;
|
||||
|
||||
case InfoItemType::MmuSegmentation:
|
||||
cnv->get_gizmos_manager().reset_all_states();
|
||||
Plater::TakeSnapshot(plater, _L("Remove Multi Material painting"));
|
||||
for (ModelVolume* mv : (*m_objects)[obj_idx]->volumes)
|
||||
mv->mmu_segmentation_facets.clear();
|
||||
break;
|
||||
|
||||
case InfoItemType::Sinking:
|
||||
Plater::TakeSnapshot(plater, _L("Shift objects to bed"));
|
||||
(*m_objects)[obj_idx]->ensure_on_bed();
|
||||
cnv->reload_scene(true, true);
|
||||
break;
|
||||
|
||||
case InfoItemType::VariableLayerHeight:
|
||||
Plater::TakeSnapshot(plater, _L("Remove variable layer height"));
|
||||
(*m_objects)[obj_idx]->layer_height_profile.clear();
|
||||
if (cnv->is_layers_editing_enabled())
|
||||
//cnv->post_event(SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING));
|
||||
cnv->force_main_toolbar_left_action(cnv->get_main_toolbar_item_id("layersediting"));
|
||||
break;
|
||||
|
||||
case InfoItemType::Undef : assert(false); break;
|
||||
}
|
||||
cnv->post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
||||
}
|
||||
|
||||
void ObjectList::del_settings_from_config(const wxDataViewItem& parent_item)
|
||||
|
Loading…
Reference in New Issue
Block a user