From 6c63c0d94873797883d4152a83833f4131afac90 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 24 Feb 2019 17:29:12 +0200 Subject: [PATCH] Fixed issue #954. Valentina produces empty rotation operation. --HG-- branch : release --- ChangeLog.txt | 1 + src/libs/vtools/dialogs/tools/dialogrotation.cpp | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a643c01fe..e45e1eda6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -14,6 +14,7 @@ - [#939] Calling Formula Wizard through property explorer doesn't refresh formula. - [#937] Wrong symmetrical seam corners on pieces. - [#942] Save Layout mode ignores paper format for tiled PDF. +- [#954] Valentina produces empty rotation operation. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index 018f7ad21..1bd67b387 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -247,10 +247,18 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type) if (objects.contains(id)) { - // 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 (objects.size() > 1) + { + // 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()); + } + else + { + emit ToolTip(tr("This point cannot be origin point. Please, select another origin point")); + return; + } } if (SetObject(id, ui->comboBoxOriginPoint, QString()))