From 9c5c9a0e78660f8f7715aeb8c9b2896403a3c0f8 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 9 Sep 2021 17:15:55 +0200 Subject: [PATCH] ObjectList: Fixed a bug related to an update of selection in 3DScene. Steps to repro: 1. Create some object with several parts. 2. Increase instances count. 3. Select some volume in ObjectList => all related volumes for each instance are selected in 3DScene (CORRECT) 4. Select last instance in ObjectList => all volumes (except one) of selected instance are selected in 3DScene (UNCORRECT). ALL volumes of selected instance have to be selected in 3DScene Fix: To avoid lost of some volumes in selection check non-selected volumes only if 3DScene-selection mode wasn't changed or there is no single selection in ObjectList --- src/slic3r/GUI/GUI_ObjectList.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index bf174cbf12..378f91cbc6 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -3465,7 +3465,11 @@ void ObjectList::update_selections_on_canvas() else { // add - volume_idxs = selection.get_unselected_volume_idxs_from(volume_idxs); + // to avoid lost of some volumes in selection + // check non-selected volumes only if selection mode wasn't changed + // OR there is no single selection + if (selection.get_mode() == mode || !single_selection) + volume_idxs = selection.get_unselected_volume_idxs_from(volume_idxs); Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Add from list"))); selection.add_volumes(mode, volume_idxs, single_selection); }