From 112f4a2d29a231c05b9f9379f522e43801439e1f Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 28 Sep 2024 19:05:52 +0200 Subject: [PATCH] Core: Do not set to XY plane by default if the rotation of the image doesn't match --- src/Gui/TaskView/TaskImage.cpp | 4 ++++ src/Gui/TaskView/TaskImage.ui | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Gui/TaskView/TaskImage.cpp b/src/Gui/TaskView/TaskImage.cpp index c3fad9ceca..69642bb011 100644 --- a/src/Gui/TaskView/TaskImage.cpp +++ b/src/Gui/TaskView/TaskImage.cpp @@ -416,6 +416,10 @@ void TaskImage::updatePlacement() else if (ui->YZ_radioButton->isChecked()) { rot.setYawPitchRoll(90. - dir, -angle, 90.); } + else if (!feature.expired()) { + Base::Placement plm = feature->Placement.getValue(); + rot = plm.getRotation(); + } // NOLINTEND Base::Vector3d offset = Base::Vector3d(ui->spinBoxX->value().getValue(), diff --git a/src/Gui/TaskView/TaskImage.ui b/src/Gui/TaskView/TaskImage.ui index 589d949f81..37aac262c7 100644 --- a/src/Gui/TaskView/TaskImage.ui +++ b/src/Gui/TaskView/TaskImage.ui @@ -27,9 +27,6 @@ XY-Plane - - true -