From 3b8d42a64f32455d701ee9be9eecca1dd9d925c1 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 19 Dec 2019 10:06:46 +0100 Subject: [PATCH] Fixed selection after cut command --- src/slic3r/GUI/Plater.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index d65fd78c5f..8b452e9afb 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -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()