Added functions for deleting (sub)objects from model and list at the same time

This commit is contained in:
YuSanka 2018-11-13 14:17:35 +01:00
parent ad8f270796
commit 05e2d33d3f
4 changed files with 63 additions and 1 deletions

View file

@ -907,6 +907,7 @@ struct Plater::priv
void object_list_changed();
void remove(size_t obj_idx);
void delete_object_from_model(size_t obj_idx);
void reset();
void mirror(Axis axis);
void arrange();
@ -1436,6 +1437,12 @@ void Plater::priv::remove(size_t obj_idx)
update();
}
void Plater::priv::delete_object_from_model(size_t obj_idx)
{
model.delete_object(obj_idx);
}
void Plater::priv::reset()
{
// Prevent toolpaths preview from rendering while we modify the Print object
@ -2055,6 +2062,7 @@ void Plater::update(bool force_autocenter) { p->update(force_autocenter); }
void Plater::select_view(const std::string& direction) { p->select_view(direction); }
void Plater::remove(size_t obj_idx) { p->remove(obj_idx); }
void Plater::delete_object_from_model(size_t obj_idx) { p->delete_object_from_model(obj_idx); }
void Plater::remove_selected()
{