From 3e4b82b3cc029a51b40bace6dbb404c4693f0d20 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 10 May 2020 11:25:25 +0300 Subject: [PATCH] Correct user defined export scale factor. (cherry picked from commit dda789e4449bafc634241dcc9f8df25da7b173e2) --- src/app/valentina/core/vcmdexport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index 55aa4071d..e8354c418 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -415,7 +415,7 @@ qreal VCommandLine::ExportXScale() const qreal xs = 1; if (IsOptionSet(LONG_OPTION_EXPXSCALE)) { - xs = OptionValue(LONG_OPTION_EXPXSCALE).toDouble(); + xs = qBound(0.01, OptionValue(LONG_OPTION_EXPXSCALE).toDouble(), 3.0); } return xs; } @@ -426,7 +426,7 @@ qreal VCommandLine::ExportYScale() const qreal ys = 1; if (IsOptionSet(LONG_OPTION_EXPYSCALE)) { - ys = OptionValue(LONG_OPTION_EXPYSCALE).toDouble(); + ys = qBound(0.01, OptionValue(LONG_OPTION_EXPYSCALE).toDouble(), 3.0); } return ys; }