From 4757912c95f164cd8722b67b4453e3258cdceab3 Mon Sep 17 00:00:00 2001 From: mwganson Date: Fri, 5 Oct 2018 16:14:17 -0500 Subject: [PATCH] placement dlg - do reselection prior to updating center coordinates -- prevents other object moving if apply incremental changes is not enabled --- src/Gui/Placement.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 663166e613..4041bcaac6 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -317,6 +317,14 @@ void Placement::on_selectedVertex_clicked() } picked.insert(picked.begin(),points.begin(),points.end()); } + //we have to clear selection and reselect original object(s) + //else later on the rotation is applied twice because there will + //be 2 (vertex) objects in the selection, and even if both are subobjects + //of the same object the rotation still gets applied twice + Gui::Selection().clearSelection(); + //reselect original object that was selected when placement dlg first opened + for (auto it : selectionObjects) + Gui::Selection().addSelection(it); if (picked.size() == 1) { ui->xCnt->setValue(picked[0].x); @@ -421,15 +429,6 @@ information is provided in the report view, which can be useful when aligning ob ui->yCnt->setValue(0); ui->zCnt->setValue(0); return; - } else { - //we have to clear selection and reselect original object(s) - //else later on the rotation is applied twice because there will - //be 2 (vertex) objects in the selection, and even if both are subobjects - //of the same object the rotation still gets applied twice - Gui::Selection().clearSelection(); - //reselect original object that was selected when placement dlg first opened - for (auto it : selectionObjects) - Gui::Selection().addSelection(it); } }