Fixed selection after cut command

This commit is contained in:
Enrico Turri 2019-12-19 10:06:46 +01:00
parent f8adf99c8d
commit 3b8d42a64f

View File

@ -4656,6 +4656,13 @@ void Plater::cut(size_t obj_idx, size_t instance_idx, coordf_t z, bool keep_uppe
remove(obj_idx);
p->load_model_objects(new_objects);
Selection& selection = p->get_selection();
size_t last_id = p->model.objects.size() - 1;
for (size_t i = 0; i < new_objects.size(); ++i)
{
selection.add_object((unsigned int)(last_id - i), i == 0);
}
}
void Plater::export_gcode()