From 785d72117dceb4025fb4a8ee94688ac7ab0edb43 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 6 Aug 2021 16:54:45 +0300 Subject: [PATCH] Fix incorrect comparison of the global length of passmark to minimal allowed value. --- ChangeLog.txt | 1 + src/libs/vpatterndb/vpiece.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 85431bd70..1bfe4a652 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,7 @@ - Fix finding point of intersection curve and axis. Case when the axis's point lies on the curve. - Fix visualization for tool point of intersection line and axis. Case when the axis's point lies on the line. - Table of variables is available in Details mode. +- Fix incorrect comparison of the global length of passmark to minimal allowed value. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index 8d1eba71a..6e08481c4 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -1187,7 +1187,7 @@ auto VPiece::GlobalPassmarkLength(const VContainer *data) const -> qreal QSharedPointer var = data->GetVariable(passmarkLengthVariable); length = *var->GetValue(); - if (length <= accuracyPointOnLine) + if (VAbstractValApplication::VApp()->toPixel(length) <= accuracyPointOnLine) { const QString errorMsg = QObject::tr("Invalid global value for a passmark length. Piece '%1'. Length is " "less than minimal allowed.")