From 1a231872b51e30f1d2cf6b89f2af4425ea264800 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 4 Mar 2018 13:54:28 +0200 Subject: [PATCH] Improve roatation tool. It's not really logical for a user that a center of rotation no need to select. To fix this issue we just silently remove it from the list. --HG-- branch : develop --- src/libs/vtools/dialogs/tools/dialogrotation.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index c03b11e70..579a06aca 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -242,16 +242,19 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type) { if (type == SceneObject::Point) { + VisToolRotation *operation = qobject_cast(vis); + SCASSERT(operation != nullptr) + if (objects.contains(id)) { - emit ToolTip(tr("Select origin point that is not part of the list of objects")); - return; + // It's not really logical for a user that a center of rotation no need to select. + // To fix this issue we just silently remove it from the list. + objects.removeOne(id); + operation->SetObjects(objects.toVector()); } if (SetObject(id, ui->comboBoxOriginPoint, "")) { - VisToolRotation *operation = qobject_cast(vis); - SCASSERT(operation != nullptr) VAbstractMainWindow *window = qobject_cast(qApp->getMainWindow()); SCASSERT(window != nullptr) connect(operation, &Visualization::ToolTip, window, &VAbstractMainWindow::ShowToolTip);