From aa64076a367eb5a81ef28557f6d3029c2045ebb0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 9 Feb 2016 17:19:14 +0200 Subject: [PATCH] Tool line. Block selecting the same point twice. (grafted from 0029c3e3b5ae45d21f834f0d36023d8ef9734345) --HG-- branch : develop --- ChangeLog.txt | 1 + src/libs/vtools/dialogs/tools/dialogline.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index c8910ff8f..12d4e7374 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,7 @@ - [#325] Check pattern for inverse compatibility. # Version 0.4.2 +- Tool line. Block selecting the same point twice. - [#443] Not valid dxf file. libdxf updated to version 3.12.2.0. Fixed drawing subpaths. - Fixed combobox width in Dialog "Tool True Dart point". - [#441] Broken reference incrementation for tool "True Dart point". diff --git a/src/libs/vtools/dialogs/tools/dialogline.cpp b/src/libs/vtools/dialogs/tools/dialogline.cpp index 8c7cf6737..1c0da0f3e 100644 --- a/src/libs/vtools/dialogs/tools/dialogline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogline.cpp @@ -182,13 +182,16 @@ void DialogLine::ChosenObject(quint32 id, const SceneObject &type) } break; case 1: - if (SetObject(id, ui->comboBoxSecondPoint, "")) + if (getCurrentObjectId(ui->comboBoxFirstPoint) != id) { - if (flagError) + if (SetObject(id, ui->comboBoxSecondPoint, "")) { - number = 0; - prepare = true; - DialogAccepted(); + if (flagError) + { + number = 0; + prepare = true; + DialogAccepted(); + } } } break;