From 5672e616affa5e33d78877ed1f98e393d45d711f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 11 Jun 2021 15:30:06 +0300 Subject: [PATCH 01/32] Fix parsing formulas with not canonical math symbols. --- ChangeLog.txt | 1 + src/libs/qmuparser/qmuformulabase.cpp | 37 +++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9a3b40447..75b1583cd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ # Valentina 0.7.48 (unreleased) - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. +- Parsing formulas with not canonical math symbols. # Version 0.7.47 May 13, 2021 - [smart-pattern/valentina#118] Incorrect seam allowance. diff --git a/src/libs/qmuparser/qmuformulabase.cpp b/src/libs/qmuparser/qmuformulabase.cpp index d9cf3daba..39091a3ae 100644 --- a/src/libs/qmuparser/qmuformulabase.cpp +++ b/src/libs/qmuparser/qmuformulabase.cpp @@ -80,17 +80,44 @@ void QmuFormulaBase::InitCharSets() Q_UNUSED(decimalPoint) Q_UNUSED(groupSeparator) + // Together with localized symbols, we always must include canonical symbols + auto AddNotCanonical = [](QString &chars, const QChar &c, const QChar &canonical) + { + if (c != canonical) + { + chars += c; + } + }; + // Defining identifier character sets - const QString nameChars = QString() + sign0 + sign1 + sign2 + sign3 + sign4 + sign5 + sign6 + sign7 + sign8 + - sign9 + QStringLiteral("\\_@#'") + symbolsStr; + QString nameChars = QStringLiteral("0123456789\\_@#'") + symbolsStr; + + AddNotCanonical(nameChars, sign0, '0'); + AddNotCanonical(nameChars, sign1, '1'); + AddNotCanonical(nameChars, sign2, '2'); + AddNotCanonical(nameChars, sign3, '3'); + AddNotCanonical(nameChars, sign4, '4'); + AddNotCanonical(nameChars, sign5, '5'); + AddNotCanonical(nameChars, sign6, '6'); + AddNotCanonical(nameChars, sign7, '7'); + AddNotCanonical(nameChars, sign8, '8'); + AddNotCanonical(nameChars, sign9, '9'); + DefineNameChars(nameChars); - const QString opChars = QStringLiteral("*^/?<>=!$%&|~'_"); + const QString opChars = QStringLiteral("+-*^/?<>=!$%&|~'_"); + + QString oprtChars = symbolsStr + opChars; + AddNotCanonical(oprtChars, positiveSign, '+'); + AddNotCanonical(oprtChars, negativeSign, '-'); - const QString oprtChars = symbolsStr + positiveSign + negativeSign + opChars; DefineOprtChars(oprtChars); - const QString infixOprtChars = QString() + positiveSign + negativeSign + opChars; + QString infixOprtChars = opChars; + + AddNotCanonical(infixOprtChars, positiveSign, '+'); + AddNotCanonical(infixOprtChars, negativeSign, '-'); + DefineInfixOprtChars(infixOprtChars); } From 4bf9a70a65d856ee44b09388369543462eeed23c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Jun 2021 16:30:22 +0300 Subject: [PATCH 02/32] Update website link. We now have new website. --- README.txt | 7 +++---- dist/OBS_debian/debian.control | 2 +- dist/OBS_debian/valentina.dsc | 2 +- dist/SlackBuild/valentina/slack-desc | 2 +- dist/SlackBuild/valentina/valentina.info | 2 +- dist/debian/control | 2 +- dist/ebuild/valentina-0.0.0(template_stable).ebuild | 2 +- .../ebuild/valentina-0.0.0_alpha(template_unstable).ebuild | 2 +- dist/valentina.dsc | 2 +- dist/win/inno/valentina.iss | 4 ++-- src/app/valentina/xml/vpattern.cpp | 2 +- src/libs/ifc/xml/vabstractmconverter.cpp | 2 +- src/libs/vformat/vmeasurements.cpp | 2 +- src/libs/vformat/vpatternrecipe.cpp | 2 +- src/libs/vformat/vwatermark.cpp | 2 +- src/libs/vmisc/projectversion.h | 2 +- src/libs/vobj/vobjengine.cpp | 4 ++-- 17 files changed, 21 insertions(+), 22 deletions(-) diff --git a/README.txt b/README.txt index 3c631acd9..7063a24fd 100644 --- a/README.txt +++ b/README.txt @@ -1,10 +1,9 @@ Pattern making program Author Roman Telezhynskyi -Copyright (C) 2013-2019 Valentina project -Valentina Web page: https://valentinaproject.bitbucket.io/ +Copyright (C) 2013-2021 Valentina project +Valentina Web page: https://smart-pattern.com.ua/ Wiki: https://wiki.valentinaproject.org -Valentina main repository: https://bitbucket.org/dismine/valentina/overview -Forum http://valentinaproject.forumotion.me/ +Valentina main repository: https://gitlab.com/smart-pattern/valentina PPA for Ubuntu (develop): https://launchpad.net/~dismine/+archive/valentina-dev Help translate https://www.transifex.com/organization/valentina diff --git a/dist/OBS_debian/debian.control b/dist/OBS_debian/debian.control index 0263f7777..d503d5f03 100644 --- a/dist/OBS_debian/debian.control +++ b/dist/OBS_debian/debian.control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 8.0.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 -Homepage: https://valentinaproject.bitbucket.io/ +Homepage: https://smart-pattern.com.ua/ Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina diff --git a/dist/OBS_debian/valentina.dsc b/dist/OBS_debian/valentina.dsc index 7d0229a70..b2c6ea437 100644 --- a/dist/OBS_debian/valentina.dsc +++ b/dist/OBS_debian/valentina.dsc @@ -4,7 +4,7 @@ Binary: valentina Architecture: i386 amd64 Version: 0.7.47 Maintainer: Roman Telezhynskyi -Homepage: https://valentinaproject.bitbucket.io +Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 Vcs-Browser: https://gitlab.com/smart-pattern/valentina Build-Depends: debhelper (>= 8.0.0), diff --git a/dist/SlackBuild/valentina/slack-desc b/dist/SlackBuild/valentina/slack-desc index 6c9e963d5..a23637f1e 100644 --- a/dist/SlackBuild/valentina/slack-desc +++ b/dist/SlackBuild/valentina/slack-desc @@ -14,7 +14,7 @@ valentina: allows pattern creation, using either standard sizing tables or an valentina: individual’s set of measurements. It blends new technologies with valentina: traditional methods to create a unique pattern making tool. valentina: -valentina: Homepage: https://valentinaproject.bitbucket.io/ +valentina: Homepage: https://smart-pattern.com.ua/ valentina: valentina: valentina: diff --git a/dist/SlackBuild/valentina/valentina.info b/dist/SlackBuild/valentina/valentina.info index cd509a875..0bbfda755 100644 --- a/dist/SlackBuild/valentina/valentina.info +++ b/dist/SlackBuild/valentina/valentina.info @@ -1,6 +1,6 @@ PRGNAM="valentina" VERSION="0.5.0" -HOMEPAGE="https://valentinaproject.bitbucket.io" +HOMEPAGE="https://smart-pattern.com.ua" DOWNLOAD="https://bitbucket.org/dismine/valentina/get/v0.5.0.tar.gz" MD5SUM="f23019c92e3209dbfa7699a1c13bb98b" DOWNLOAD_x86_64="" diff --git a/dist/debian/control b/dist/debian/control index 0263f7777..d503d5f03 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 8.0.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 -Homepage: https://valentinaproject.bitbucket.io/ +Homepage: https://smart-pattern.com.ua/ Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina diff --git a/dist/ebuild/valentina-0.0.0(template_stable).ebuild b/dist/ebuild/valentina-0.0.0(template_stable).ebuild index dcb039136..db09b3fd2 100644 --- a/dist/ebuild/valentina-0.0.0(template_stable).ebuild +++ b/dist/ebuild/valentina-0.0.0(template_stable).ebuild @@ -7,7 +7,7 @@ EAPI=5 inherit qmake-utils gnome2-utils fdo-mime DESCRIPTION="Cloth patternmaking software" -HOMEPAGE="https://valentinaproject.bitbucket.io/" +HOMEPAGE="https://smart-pattern.com.ua/" SRC_URI="https://bitbucket.org/dismine/valentina/get/v0.0.0.zip -> ${P}.zip" LICENSE="GPL-3" diff --git a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild index e1721b09e..45a67e704 100644 --- a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild +++ b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild @@ -7,7 +7,7 @@ EAPI=5 inherit mercurial qmake-utils gnome2-utils fdo-mime DESCRIPTION="Cloth patternmaking software" -HOMEPAGE="https://valentinaproject.bitbucket.io/" +HOMEPAGE="https://smart-pattern.com.ua/" SRC_URI="" EHG_REPO_URI="https://bitbucket.org/dismine/valentina" EHG_REVISION="develop" diff --git a/dist/valentina.dsc b/dist/valentina.dsc index 2946f516b..076282eef 100644 --- a/dist/valentina.dsc +++ b/dist/valentina.dsc @@ -4,7 +4,7 @@ Binary: valentina Architecture: i386 amd64 Version: 0.7.47 Maintainer: Roman Telezhynskyi -Homepage: https://valentinaproject.bitbucket.io +Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 Vcs-Browser: https://gitlab.com/smart-pattern/valentina Build-Depends: debhelper (>= 8.0.0), diff --git a/dist/win/inno/valentina.iss b/dist/win/inno/valentina.iss index 518b888b3..d9c9f7e87 100644 --- a/dist/win/inno/valentina.iss +++ b/dist/win/inno/valentina.iss @@ -4,9 +4,9 @@ #define MyAppName "Valentina" #define MyAppVersion GetFileVersion('valentina\valentina.exe') #define MyAppPublisher "Roman Telezhynskyi" -#define MyAppURL "https://valentinaproject.bitbucket.io/" +#define MyAppURL "https://smart-pattern.com.ua/" #define MyAppExeName "valentina.exe" -#define MyAppCopyright "(C) 2013-2020 Valentina project" +#define MyAppCopyright "(C) 2013-2021 Valentina project" #define MyDateTimeString GetDateTimeString('yyyymmddhhnnss', '', ''); ; Appstatus: "" = release, "b" = beta, "a" = alpha ; this only modifies the resulting exe name of the installer package ;-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 550bbc3ba..74828e4c7 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -85,7 +85,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QStringLiteral("Pattern created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QStringLiteral("Pattern created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } diff --git a/src/libs/ifc/xml/vabstractmconverter.cpp b/src/libs/ifc/xml/vabstractmconverter.cpp index 1cfb68bc2..af2ab9b3c 100644 --- a/src/libs/ifc/xml/vabstractmconverter.cpp +++ b/src/libs/ifc/xml/vabstractmconverter.cpp @@ -58,7 +58,7 @@ auto VAbstractMConverter::Units() const -> Unit void VAbstractMConverter::AddRootComment() { const QString rootComment = - QStringLiteral("Measurements created with Valentina (https://valentinaproject.bitbucket.io/)."); + QStringLiteral("Measurements created with Valentina (https://smart-pattern.com.ua/)."); QDomElement rootElement = this->documentElement(); rootElement.insertBefore(createComment(rootComment), rootElement.firstChild()); diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index 9f5feb51c..8b16c66e2 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -114,7 +114,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, defBirthDate, (QLatin1String("1800-01-0 //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QString("Measurements created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QString("Measurements created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } } diff --git a/src/libs/vformat/vpatternrecipe.cpp b/src/libs/vformat/vpatternrecipe.cpp index 241f9a99a..a3722a9d7 100644 --- a/src/libs/vformat/vpatternrecipe.cpp +++ b/src/libs/vformat/vpatternrecipe.cpp @@ -61,7 +61,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- inline QString FileComment() { - return QStringLiteral("Recipe created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QStringLiteral("Recipe created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } diff --git a/src/libs/vformat/vwatermark.cpp b/src/libs/vformat/vwatermark.cpp index 04cb94b55..97e5d0aba 100644 --- a/src/libs/vformat/vwatermark.cpp +++ b/src/libs/vformat/vwatermark.cpp @@ -45,7 +45,7 @@ namespace //--------------------------------------------------------------------------------------------------------------------- QString FileComment() { - return QString("Watermark created with Valentina v%1 (https://valentinaproject.bitbucket.io/).") + return QString("Watermark created with Valentina v%1 (https://smart-pattern.com.ua/).") .arg(APP_VERSION_STR); } } diff --git a/src/libs/vmisc/projectversion.h b/src/libs/vmisc/projectversion.h index 690534416..716fa6acf 100644 --- a/src/libs/vmisc/projectversion.h +++ b/src/libs/vmisc/projectversion.h @@ -66,7 +66,7 @@ extern const QString APP_VERSION_STR; //#define VER_ORIGINALFILENAME_STR "valentina.exe" // Defined in program //#define VER_PRODUCTNAME_STR "Valentina" // Defined in program -#define VER_COMPANYDOMAIN_STR "valentinaproject.bitbucket.io" +#define VER_COMPANYDOMAIN_STR "smart-pattern.com.ua" QString compilerString(); QString buildCompatibilityString(); diff --git a/src/libs/vobj/vobjengine.cpp b/src/libs/vobj/vobjengine.cpp index cdc9fafbd..90ca1c522 100644 --- a/src/libs/vobj/vobjengine.cpp +++ b/src/libs/vobj/vobjengine.cpp @@ -128,10 +128,10 @@ bool VObjEngine::begin(QPaintDevice *pdev) stream = QSharedPointer(new QTextStream(outputDevice.data())); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "# Valentina OBJ File" << endl; - *stream << "# valentinaproject.bitbucket.io/" << endl; + *stream << "# smart-pattern.com.ua/" << endl; #else *stream << "# Valentina OBJ File" << Qt::endl; - *stream << "# valentinaproject.bitbucket.io/" << Qt::endl; + *stream << "# smart-pattern.com.ua/" << Qt::endl; #endif return true; } From 5eaff85a60a60375a2b40630af4df18e312d07fc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Jun 2021 16:38:12 +0300 Subject: [PATCH 03/32] Add link to our shop. --- src/app/valentina/mainwindow.cpp | 5 +++++ src/app/valentina/mainwindow.ui | 22 ++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index cd1595834..5083b153e 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -4917,6 +4917,11 @@ void MainWindow::CreateActions() qCDebug(vMainWindow, "Reporting bug"); QDesktopServices::openUrl(QUrl(QStringLiteral("https://gitlab.com/smart-pattern/valentina/issues/new"))); }); + connect(ui->actionShop, &QAction::triggered, this, []() + { + qCDebug(vMainWindow, "Open shop"); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://smart-pattern.com.ua/catalogue/"))); + }); connect(ui->actionLast_tool, &QAction::triggered, this, &MainWindow::LastUsedTool); diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index 0a78e70ba..ca14002f7 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -372,7 +372,7 @@ 0 0 - 104 + 140 108 @@ -481,7 +481,7 @@ 0 0 - 104 + 126 243 @@ -746,7 +746,7 @@ 0 0 - 104 + 126 282 @@ -1037,7 +1037,7 @@ 0 0 - 98 + 140 102 @@ -1120,7 +1120,7 @@ 0 0 - 104 + 126 192 @@ -1324,7 +1324,7 @@ 0 0 - 104 + 126 237 @@ -1589,8 +1589,8 @@ 0 0 - 104 - 57 + 140 + 168 @@ -1728,6 +1728,7 @@ &Help + @@ -3026,6 +3027,11 @@ Create or edit a watermark + + + Shop + + From 8cc9a221c6399045cae1bf88f22798d8cc10b53e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Jun 2021 16:48:37 +0300 Subject: [PATCH 04/32] As suggested by user, use file name when call save as. --- src/app/tape/tmainwindow.cpp | 5 +++++ src/app/valentina/mainwindow.cpp | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index e93e86962..bd01e631e 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -897,6 +897,11 @@ bool TMainWindow::FileSaveAs() usedNotExistedDir = directory.mkpath(QChar('.')); } + if (not curFile.isEmpty()) + { + fName = StrippedName(curFile); + } + QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"), dir + QChar('/') + fName, filters, nullptr, VAbstractApplication::VApp()->NativeFileDialog()); diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 5083b153e..86febb45b 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3137,8 +3137,15 @@ bool MainWindow::on_actionSaveAs_triggered() usedNotExistedDir = directory.mkpath(QChar('.')); } + QString newFileName = tr("pattern") + QLatin1String(".val"); + + if(not VAbstractValApplication::VApp()->GetPatternPath().isEmpty()) + { + newFileName = StrippedName(VAbstractValApplication::VApp()->GetPatternPath()); + } + QString fileName = QFileDialog::getSaveFileName(this, tr("Save as"), - dir + QLatin1String("/") + tr("pattern") + QLatin1String(".val"), + dir + QLatin1String("/") + newFileName, filters, nullptr, VAbstractApplication::VApp()->NativeFileDialog()); auto RemoveTempDir = qScopeGuard([usedNotExistedDir, dir]() From 3c27c3ee46517ad841b58a9e9dc0e691e25b16cc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Jun 2021 19:04:01 +0300 Subject: [PATCH 05/32] Fix incorrect seam allowance. Closes #133 --- ChangeLog.txt | 1 + src/libs/vgeometry/vgeometrydef.h | 2 +- .../ValentinaTest/share/Issue_642/output.json | 5 - .../share/Issue_923_test1/output.json | 18 +- .../share/Issue_923_test1_1/output.json | 18 +- .../share/Issue_923_test2/output.json | 18 +- .../share/Issue_923_test2_2/output.json | 18 +- .../share/Issue_923_test3/output.json | 18 +- .../share/Issue_923_test3_3/output.json | 18 +- .../share/Issue_923_test4/output.json | 18 +- .../share/Issue_923_test4_4/output.json | 18 +- .../share/Issue_923_test5/output.json | 18 +- .../share/Issue_923_test5_5/output.json | 18 +- .../share/Issue_923_test6/output.json | 18 +- .../share/Issue_923_test6_6/output.json | 18 +- .../share/Issue_923_test7_1/output.json | 18 +- .../share/Issue_923_test7_2/output.json | 18 +- .../share/Issue_923_test7_3/output.json | 18 +- src/test/ValentinaTest/share/doll/output.json | 5 - .../share/loop_by_intersection/output.json | 12 +- .../loop_start_point_on_line/output.json | 22 +- .../share/seamtest1_by_angle/output.json | 10 - .../share/seamtest1_by_angle_2/output.json | 14 +- .../output.json | 10 - .../output.json | 10 - .../seamtest1_by_intersection/output.json | 10 - .../output.json | 10 - .../output.json | 19 +- .../smart_pattern_#120_piece_1/output.json | 5 - .../smart_pattern_#120_piece_2/output.json | 33 +- .../share/smart_pattern_#133/input.json | 286 ++++++++++++++++++ .../share/smart_pattern_#133/output.json | 144 +++++++++ .../share/smart_pattern_#36/input.json | 30 +- .../share/smart_pattern_#36/output.json | 45 ++- .../share/smart_pattern_#99/output.json | 270 ++++++++--------- src/test/ValentinaTest/share/test_data.qrc | 2 + src/test/ValentinaTest/tst_vabstractpiece.cpp | 6 + 37 files changed, 690 insertions(+), 531 deletions(-) create mode 100644 src/test/ValentinaTest/share/smart_pattern_#133/input.json create mode 100644 src/test/ValentinaTest/share/smart_pattern_#133/output.json diff --git a/ChangeLog.txt b/ChangeLog.txt index 75b1583cd..faed568f1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,7 @@ # Valentina 0.7.48 (unreleased) - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - Parsing formulas with not canonical math symbols. +- [smart-pattern/valentina#133] Incorrect seam allowance. # Version 0.7.47 May 13, 2021 - [smart-pattern/valentina#118] Incorrect seam allowance. diff --git a/src/libs/vgeometry/vgeometrydef.h b/src/libs/vgeometry/vgeometrydef.h index f6329762b..75f2119cf 100644 --- a/src/libs/vgeometry/vgeometrydef.h +++ b/src/libs/vgeometry/vgeometrydef.h @@ -97,7 +97,7 @@ private: }; Q_DECLARE_METATYPE(VLayoutPassmark) -constexpr qreal accuracyPointOnLine = (0.138/*mm*/ / 25.4) * PrintDPI; +constexpr qreal accuracyPointOnLine = (0.1555/*mm*/ / 25.4) * PrintDPI; Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2, qreal accuracy = accuracyPointOnLine); diff --git a/src/test/ValentinaTest/share/Issue_642/output.json b/src/test/ValentinaTest/share/Issue_642/output.json index 6506b435d..5f4c32f0e 100644 --- a/src/test/ValentinaTest/share/Issue_642/output.json +++ b/src/test/ValentinaTest/share/Issue_642/output.json @@ -170,11 +170,6 @@ "x": 2797.5081938293038, "y": 711.5320126236637 }, - { - "type": "QPointF", - "x": 2797.565477459869, - "y": 778.332404004272 - }, { "type": "QPointF", "x": 2798.0441679430687, diff --git a/src/test/ValentinaTest/share/Issue_923_test1/output.json b/src/test/ValentinaTest/share/Issue_923_test1/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test1/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json index 5d67403ad..4e430f2e4 100644 --- a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test2/output.json b/src/test/ValentinaTest/share/Issue_923_test2/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test2/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json index 71edb7b5f..e5c388220 100644 --- a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test3/output.json b/src/test/ValentinaTest/share/Issue_923_test3/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test3/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json index 9b6f4da36..6c5d49e6d 100644 --- a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test4/output.json b/src/test/ValentinaTest/share/Issue_923_test4/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test4/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test4/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json index 6feafaec9..7e60ea6ff 100644 --- a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test5/output.json b/src/test/ValentinaTest/share/Issue_923_test5/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test5/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test5/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json index f6882ee98..a84ce9e69 100644 --- a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test6/output.json b/src/test/ValentinaTest/share/Issue_923_test6/output.json index 4ab19c564..f47c8c892 100644 --- a/src/test/ValentinaTest/share/Issue_923_test6/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test6/output.json @@ -152,13 +152,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -197,13 +192,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json index 3f9e74ba8..2f26e2a63 100644 --- a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json index a5ba6f90e..7d051d299 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json @@ -97,13 +97,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -142,13 +137,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json index 9b5689717..1f24dd696 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json @@ -102,13 +102,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -147,13 +142,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json index 171b3ead6..6b20ebe41 100644 --- a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json +++ b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json @@ -147,13 +147,8 @@ }, { "type": "QPointF", - "x": -375.5837936477569, - "y": 385.67430269319027 - }, - { - "type": "QPointF", - "x": -394.93507981176816, - "y": 387.02124656268006 + "x": -394.4224543531813, + "y": 386.9889713429367 }, { "type": "QPointF", @@ -192,13 +187,8 @@ }, { "type": "QPointF", - "x": -740.1638197010636, - "y": 383.4834023373132 - }, - { - "type": "QPointF", - "x": -756.9739837313467, - "y": 381.8746246893899 + "x": -739.6019742862287, + "y": 383.5327301728105 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/doll/output.json b/src/test/ValentinaTest/share/doll/output.json index c87cc2e59..69c139cbb 100644 --- a/src/test/ValentinaTest/share/doll/output.json +++ b/src/test/ValentinaTest/share/doll/output.json @@ -110,11 +110,6 @@ "x": 330.9882848734929, "y": 102.87077188278468 }, - { - "type": "QPointF", - "x": 331.48273454480426, - "y": 104.45283583549359 - }, { "type": "QPointF", "x": 332.2173315417802, diff --git a/src/test/ValentinaTest/share/loop_by_intersection/output.json b/src/test/ValentinaTest/share/loop_by_intersection/output.json index 831721c92..2e9573b39 100644 --- a/src/test/ValentinaTest/share/loop_by_intersection/output.json +++ b/src/test/ValentinaTest/share/loop_by_intersection/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": -214.69613672918854, - "y": 105.50483675932705 + "x": -216.6438440863518, + "y": 101.30502907435505 }, { "type": "QPointF", - "x": -217.06541703221671, - "y": -20.396250591591283 + "x": -215.90873077439113, + "y": -22.890393162266093 }, { "type": "QPointF", @@ -292,8 +292,8 @@ }, { "type": "QPointF", - "x": -214.69613672918854, - "y": 105.50483675932705 + "x": -216.6438440863518, + "y": 101.30502907435505 } ] } diff --git a/src/test/ValentinaTest/share/loop_start_point_on_line/output.json b/src/test/ValentinaTest/share/loop_start_point_on_line/output.json index 2d339d6fc..80052e138 100644 --- a/src/test/ValentinaTest/share/loop_start_point_on_line/output.json +++ b/src/test/ValentinaTest/share/loop_start_point_on_line/output.json @@ -17,18 +17,18 @@ }, { "type": "QPointF", - "x": -2083.1478929409827, - "y": -1220.0868889606825 + "x": -2082.7202896908407, + "y": -1220.2021340324343 }, { "type": "QPointF", - "x": -2056.8141936259476, - "y": -1225.6770902684877 + "x": -2057.1296527192585, + "y": -1225.0231603699012 }, { "type": "QPointF", - "x": -2029.2249477701505, - "y": -1230.8064422813395 + "x": -2030.268678428484, + "y": -1230.6480813100734 }, { "type": "QPointF", @@ -120,11 +120,6 @@ "x": -1592.433553865018, "y": -1150.9286376239052 }, - { - "type": "QPointF", - "x": -1581.1249477487709, - "y": -1139.9848040550612 - }, { "type": "QPointF", "x": -1574.7272893318411, @@ -310,11 +305,6 @@ "x": -1984.5634596707787, "y": -98.8935172003726 }, - { - "type": "QPointF", - "x": -1990.4276010223648, - "y": -91.09922907737571 - }, { "type": "QPointF", "x": -1997.2051328041664, diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json index 51d6dcf24..55a851c7c 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json @@ -225,21 +225,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json index 7e2ce0cfa..38483c8a9 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json @@ -7,8 +7,8 @@ }, { "type": "QPointF", - "x": 1101.8482040478996, - "y": 244.8082798528157 + "x": 1102.2898194097418, + "y": 245.01541704287078 }, { "type": "QPointF", @@ -140,21 +140,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json index 6c23608ec..b2706a7b4 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json @@ -240,21 +240,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json index ed69f50c4..4d6b6e335 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json @@ -240,21 +240,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json index 1fa3de755..0fca67a6b 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json @@ -230,21 +230,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json index b1182dcbc..462176cf6 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json @@ -230,21 +230,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json index 83784e3b1..9dc924f52 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json @@ -67,13 +67,8 @@ }, { "type": "QPointF", - "x": 284.4390076163077, - "y": -68.44485122652873 - }, - { - "type": "QPointF", - "x": 284.5734311894892, - "y": -68.99248415563486 + "x": 284.4959443876258, + "y": -68.43087536087263 }, { "type": "QPointF", @@ -230,21 +225,11 @@ "x": 1074.3830151134664, "y": 697.7096649640414 }, - { - "type": "QPointF", - "x": 1078.7265805419665, - "y": 699.565875909043 - }, { "type": "QPointF", "x": 1083.206554246492, "y": 701.1878034134409 }, - { - "type": "QPointF", - "x": 1087.891993301369, - "y": 702.5858632116882 - }, { "type": "QPointF", "x": 1092.8646688655851, diff --git a/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json b/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json index 456c459cf..c6c66a011 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#120_piece_1/output.json @@ -260,11 +260,6 @@ "x": 954.9126743758827, "y": 1599.02515094508 }, - { - "type": "QPointF", - "x": 941.1480338176947, - "y": 1598.7097479128342 - }, { "type": "QPointF", "x": 929.6966471777685, diff --git a/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json b/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json index dbb6c7b63..e0af32b77 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#120_piece_2/output.json @@ -2,23 +2,18 @@ "vector": [ { "type": "QPointF", - "x": 692.3263132377243, - "y": 425.0598484090772 + "x": 692.3267996783844, + "y": 425.0547824881589 }, { "type": "QPointF", - "x": 729.9485435174106, - "y": 428.6724161589221 + "x": 729.9490299580725, + "y": 428.66735023800396 }, { "type": "QPointF", - "x": 902.8367306099547, - "y": 438.0946986997068 - }, - { - "type": "QPointF", - "x": 1047.2274990256597, - "y": 444.9608350659975 + "x": 1047.3703808444025, + "y": 444.96790138807927 }, { "type": "QPointF", @@ -47,8 +42,8 @@ }, { "type": "QPointF", - "x": 1779.204057451268, - "y": 460.15036806979015 + "x": 1779.4842113185928, + "y": 460.1465274137461 }, { "type": "QPointF", @@ -117,8 +112,8 @@ }, { "type": "QPointF", - "x": 1986.4149731529892, - "y": 1450.5996057600491 + "x": 1986.415017807355, + "y": 1450.5995504284354 }, { "type": "QPointF", @@ -142,8 +137,8 @@ }, { "type": "QPointF", - "x": 2100.6375771334715, - "y": 1515.7770650603459 + "x": 2101.0413693548594, + "y": 1515.9306231177372 }, { "type": "QPointF", @@ -197,8 +192,8 @@ }, { "type": "QPointF", - "x": 692.3263132377243, - "y": 425.0598484090772 + "x": 692.3267996783844, + "y": 425.0547824881589 } ] } diff --git a/src/test/ValentinaTest/share/smart_pattern_#133/input.json b/src/test/ValentinaTest/share/smart_pattern_#133/input.json new file mode 100644 index 000000000..2d5ec1350 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#133/input.json @@ -0,0 +1,286 @@ +{ + "vector": [ + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 2929.9770747304974, + "y": -276.4297327130487 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 2929.494592436758, + "y": -276.7606225402938 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3020.6267648722614, + "y": -214.2615232263168 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3088.3164558816297, + "y": -169.50935896803173 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3129.0516855236456, + "y": -143.6575896644236 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3146.9122431535925, + "y": -132.85807100626303 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3182.3207891081, + "y": -111.31224886884328 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3240.854911582732, + "y": -74.8319142840869 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3282.194746084433, + "y": -49.82580136992735 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3310.2958622918845, + "y": -33.638475438863175 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3325.1763277140276, + "y": -25.257860139156612 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3369.4782848426557, + "y": -2.0857627157284724 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3403.4016107132747, + "y": 13.705195402949922 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3426.2415849998115, + "y": 23.34654364295037 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3449.230881619873, + "y": 32.10024036139115 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3472.3293291198524, + "y": 39.84657654277807 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3483.9089681080395, + "y": 43.255120195555406 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3483.9089681080395, + "y": 43.255120195555406 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 3447.5678964202975, + "y": 170.44883665362593 + }, + { + "angle": 4, + "saAfter": 37.795275590551185, + "type": "VSAPoint", + "x": 3447.5678964202975, + "y": 170.44883665362593 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3389.1244783120674, + "y": 153.77793257366946 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3252.3200130171417, + "y": 115.54965743238373 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3247.8444514992034, + "y": 114.3583692773959 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3173.1572046119477, + "y": 94.31817557366725 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3147.756296486791, + "y": 88.1473890182314 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3122.245206035337, + "y": 82.25776665675014 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 3041.9854088227075, + "y": 64.30895193326627 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2972.2752985376483, + "y": 49.89666830709157 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2927.2740602422737, + "y": 41.446379094112636 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2886.864263786687, + "y": 34.93216727832491 + }, + { + "angle": 6, + "saAfter": 37.795275590551185, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2854.15352003896, + "y": 31.234718533530163 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2842.1714408688977, + "y": 30.88990256838886 + }, + { + "angle": 5, + "saBefore": 37.795275590551185, + "type": "VSAPoint", + "x": 2842.1714408688977, + "y": 30.88990256838886 + } + ] +} diff --git a/src/test/ValentinaTest/share/smart_pattern_#133/output.json b/src/test/ValentinaTest/share/smart_pattern_#133/output.json new file mode 100644 index 000000000..8fff4d070 --- /dev/null +++ b/src/test/ValentinaTest/share/smart_pattern_#133/output.json @@ -0,0 +1,144 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 2914.8751101032244, + "y": -322.14660963573755 + }, + { + "type": "QPointF", + "x": 2940.3264245982937, + "y": -314.92253942662785 + }, + { + "type": "QPointF", + "x": 3041.9531023346835, + "y": -245.46521190898392 + }, + { + "type": "QPointF", + "x": 3108.6971255127173, + "y": -200.96114841642915 + }, + { + "type": "QPointF", + "x": 3148.9580710534224, + "y": -175.78835654256642 + }, + { + "type": "QPointF", + "x": 3201.9395957269226, + "y": -143.55493133873182 + }, + { + "type": "QPointF", + "x": 3261.1271882374804, + "y": -107.36170019590531 + }, + { + "type": "QPointF", + "x": 3301.3564050369955, + "y": -82.40696567509488 + }, + { + "type": "QPointF", + "x": 3343.3191765382894, + "y": -58.4213684718917 + }, + { + "type": "QPointF", + "x": 3386.2208551896647, + "y": -35.981685402091905 + }, + { + "type": "QPointF", + "x": 3418.7308452277093, + "y": -20.848620528460394 + }, + { + "type": "QPointF", + "x": 3440.319979440316, + "y": -11.735284474201483 + }, + { + "type": "QPointF", + "x": 3461.9693959581145, + "y": -3.4917775300772096 + }, + { + "type": "QPointF", + "x": 3483.678198210371, + "y": 3.788524764758021 + }, + { + "type": "QPointF", + "x": 3519.731204659397, + "y": 14.18111796688273 + }, + { + "type": "QPointF", + "x": 3462.6234754097254, + "y": 214.0581162062353 + }, + { + "type": "QPointF", + "x": 3378.7569662168626, + "y": 190.12346255909503 + }, + { + "type": "QPointF", + "x": 3242.1482695261966, + "y": 151.95046087571671 + }, + { + "type": "QPointF", + "x": 3163.799392078877, + "y": 130.9394133995313 + }, + { + "type": "QPointF", + "x": 3138.833989122527, + "y": 124.87442658272099 + }, + { + "type": "QPointF", + "x": 3034.0345168547487, + "y": 101.25971932387034 + }, + { + "type": "QPointF", + "x": 2964.9609699226594, + "y": 86.97904259878241 + }, + { + "type": "QPointF", + "x": 2920.7778125684367, + "y": 78.68237183752217 + }, + { + "type": "QPointF", + "x": 2881.731281757689, + "y": 72.38792359271476 + }, + { + "type": "QPointF", + "x": 2851.4826590738026, + "y": 68.96877993652426 + }, + { + "type": "QPointF", + "x": 2831.5261872065494, + "y": 68.39447976624034 + }, + { + "type": "QPointF", + "x": 2806.07487271148, + "y": 61.17040955713102 + }, + { + "type": "QPointF", + "x": 2914.8751101032244, + "y": -322.14660963573755 + } + ] +} diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/input.json b/src/test/ValentinaTest/share/smart_pattern_#36/input.json index 539ab800f..c884f25b1 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#36/input.json +++ b/src/test/ValentinaTest/share/smart_pattern_#36/input.json @@ -246,21 +246,6 @@ "x": 30, "y": 22311.722834645672 }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, - { - "type": "VSAPoint", - "x": 29.26377334895059, - "y": 22341.839586718215 - }, { "angle": 6, "type": "VSAPoint", @@ -291,6 +276,21 @@ "x": 21.970984779797945, "y": 22564.876825218627 }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, + { + "type": "VSAPoint", + "x": 20.500199521052405, + "y": 22612.757327074407 + }, { "angle": 6, "type": "VSAPoint", diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/output.json b/src/test/ValentinaTest/share/smart_pattern_#36/output.json index 73cd953c9..dc94f7c47 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#36/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#36/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": -218.88332702810496, - "y": 21602.601187587297 + "x": -216.57559446259248, + "y": 21608.014646112726 }, { "type": "QPointF", - "x": -222.85996685366638, - "y": 21586.28344916246 + "x": -222.82601779268137, + "y": 21587.061010495858 }, { "type": "QPointF", @@ -132,8 +132,8 @@ }, { "type": "QPointF", - "x": 55.849455392117505, - "y": 22133.479634813404 + "x": 55.82641527988781, + "y": 22132.93457364255 }, { "type": "QPointF", @@ -152,8 +152,8 @@ }, { "type": "QPointF", - "x": 55.826415279887826, - "y": 22490.511095648795 + "x": 55.84945539211752, + "y": 22489.96603447794 }, { "type": "QPointF", @@ -282,18 +282,13 @@ }, { "type": "QPointF", - "x": -220.620815347658, - "y": 23026.447080003007 + "x": -220.46264595849237, + "y": 23025.538326035232 }, { "type": "QPointF", - "x": -216.13435317554772, - "y": 23014.48384648047 - }, - { - "type": "QPointF", - "x": -202.58580499399324, - "y": 22985.400282661478 + "x": -202.6052425243754, + "y": 22985.452196583858 }, { "type": "QPointF", @@ -347,8 +342,8 @@ }, { "type": "QPointF", - "x": -115.32578480080944, - "y": 22485.162420331548 + "x": -115.33334113373941, + "y": 22485.70747025547 }, { "type": "QPointF", @@ -367,8 +362,8 @@ }, { "type": "QPointF", - "x": -115.33334113373941, - "y": 22137.738199035874 + "x": -115.32578480080944, + "y": 22138.283248959797 }, { "type": "QPointF", @@ -422,13 +417,13 @@ }, { "type": "QPointF", - "x": -202.6152214315237, - "y": 21637.97693416576 + "x": -202.58580499399324, + "y": 21638.045386629867 }, { "type": "QPointF", - "x": -218.88332702810496, - "y": 21602.601187587297 + "x": -216.57559446259248, + "y": 21608.014646112726 } ] } diff --git a/src/test/ValentinaTest/share/smart_pattern_#99/output.json b/src/test/ValentinaTest/share/smart_pattern_#99/output.json index b6cd8bac8..a7b3ce448 100644 --- a/src/test/ValentinaTest/share/smart_pattern_#99/output.json +++ b/src/test/ValentinaTest/share/smart_pattern_#99/output.json @@ -2,38 +2,38 @@ "vector": [ { "type": "QPointF", - "x": 166.2793358771866, - "y": 317.0063195835933 + "x": 166.02062314300517, + "y": 312.9788859158875 }, { "type": "QPointF", - "x": 165.64505339863834, - "y": 297.1143398796336 + "x": 165.70933046188543, + "y": 293.23000247811854 }, { "type": "QPointF", - "x": 166.1722452473025, - "y": 280.2244654294098 + "x": 167.30604170523088, + "y": 274.50013264093303 }, { "type": "QPointF", - "x": 166.16205798196063, - "y": 276.72549910116425 + "x": 167.19749972538847, + "y": 269.95767347494336 }, { "type": "QPointF", - "x": 168.97844031610092, - "y": 256.82932371757767 + "x": 167.28869518172655, + "y": 266.6239856783655 }, { "type": "QPointF", - "x": 173.11677764302698, - "y": 240.88394423619718 + "x": 171.2459135294844, + "y": 247.0901582437869 }, { "type": "QPointF", - "x": 178.0948003175508, - "y": 228.9419652712462 + "x": 176.64841312963426, + "y": 231.89367477880018 }, { "type": "QPointF", @@ -47,8 +47,8 @@ }, { "type": "QPointF", - "x": 185.99757111618186, - "y": 217.49928602474253 + "x": 186.39376078521363, + "y": 217.17940045276504 }, { "type": "QPointF", @@ -82,18 +82,13 @@ }, { "type": "QPointF", - "x": 255.24575032218632, - "y": 191.05145610681262 + "x": 258.32256210111353, + "y": 190.9510874021363 }, { "type": "QPointF", - "x": 277.95765129804875, - "y": 191.65321329780488 - }, - { - "type": "QPointF", - "x": 285.5408358146581, - "y": 192.855354584027 + "x": 282.88849327137484, + "y": 192.3327170360014 }, { "type": "QPointF", @@ -107,28 +102,28 @@ }, { "type": "QPointF", - "x": 308.61498933509586, - "y": 205.17662895779023 + "x": 310.57923284664963, + "y": 206.8104493101314 }, { "type": "QPointF", - "x": 317.8211186961886, - "y": 213.7039790657329 + "x": 320.37180984256605, + "y": 216.47325684819089 }, { "type": "QPointF", - "x": 326.23567071378, - "y": 223.57518983261718 + "x": 328.8995060022702, + "y": 227.14525040044498 }, { "type": "QPointF", - "x": 335.7687333062743, - "y": 237.32368245582865 + "x": 337.94611732452876, + "y": 240.8170859291849 }, { "type": "QPointF", - "x": 351.5894679236029, - "y": 263.84403704994895 + "x": 351.57469774103606, + "y": 263.8115467734212 }, { "type": "QPointF", @@ -167,8 +162,8 @@ }, { "type": "QPointF", - "x": 371.3330132939416, - "y": 177.8252966333725 + "x": 374.66587589785377, + "y": 175.5116088179777 }, { "type": "QPointF", @@ -177,13 +172,8 @@ }, { "type": "QPointF", - "x": 401.24232600874655, - "y": 162.09376642883635 - }, - { - "type": "QPointF", - "x": 416.5041370775075, - "y": 156.9754834453434 + "x": 400.5329831004733, + "y": 162.36522176917418 }, { "type": "QPointF", @@ -197,28 +187,23 @@ }, { "type": "QPointF", - "x": 434.6801823142321, - "y": 153.28952836821526 + "x": 438.0633612753594, + "y": 153.03192944510397 }, { "type": "QPointF", - "x": 448.33671251987124, - "y": 152.809882511774 + "x": 455.2191266225963, + "y": 153.05624563323727 }, { "type": "QPointF", - "x": 465.38530369692694, - "y": 154.00600077743474 + "x": 472.13962450478647, + "y": 155.14589827825722 }, { "type": "QPointF", - "x": 475.68791359201066, - "y": 155.9902739944185 - }, - { - "type": "QPointF", - "x": 484.19308368052646, - "y": 159.05322984284635 + "x": 482.43834619808706, + "y": 158.29886734863854 }, { "type": "QPointF", @@ -237,18 +222,18 @@ }, { "type": "QPointF", - "x": 529.6792386289801, - "y": 203.52841021677506 + "x": 536.0426969749838, + "y": 211.60401356856727 }, { "type": "QPointF", - "x": 559.7613549461172, - "y": 242.4936218299132 + "x": 559.4375896091323, + "y": 242.04457762986158 }, { "type": "QPointF", - "x": 569.5835818133556, - "y": 257.3121087709943 + "x": 569.311475660773, + "y": 256.86701943291433 }, { "type": "QPointF", @@ -257,13 +242,8 @@ }, { "type": "QPointF", - "x": 585.014909318949, - "y": 286.9983512578358 - }, - { - "type": "QPointF", - "x": 591.1019941479228, - "y": 302.05819169893664 + "x": 586.6374302807619, + "y": 290.77190755205044 }, { "type": "QPointF", @@ -277,28 +257,23 @@ }, { "type": "QPointF", - "x": 591.4691411901464, - "y": 336.9021533252068 + "x": 590.6510591717047, + "y": 340.91518746861993 }, { "type": "QPointF", - "x": 587.7772567627065, - "y": 353.05391040771735 + "x": 585.4872424358157, + "y": 361.2157855904426 }, { "type": "QPointF", - "x": 582.8754009676815, - "y": 369.4196601831339 + "x": 579.9229547052828, + "y": 377.65318039832954 }, { "type": "QPointF", - "x": 576.3979894710554, - "y": 386.4062544290843 - }, - { - "type": "QPointF", - "x": 568.7091425226228, - "y": 402.8846548007183 + "x": 571.8578768835727, + "y": 396.3873347680203 }, { "type": "QPointF", @@ -312,68 +287,68 @@ }, { "type": "QPointF", - "x": 528.3345265604034, - "y": 476.92160008646584 + "x": 526.817689287619, + "y": 478.6960129039927 }, { "type": "QPointF", - "x": 520.2343656529063, - "y": 485.0367289659276 + "x": 519.0740546654762, + "y": 485.9591789956344 }, { "type": "QPointF", - "x": 513.148845575274, - "y": 489.9896405767957 + "x": 509.94726195445895, + "y": 491.73200570919147 }, { "type": "QPointF", - "x": 505.5219398390943, - "y": 493.75314459015317 + "x": 499.48882330035383, + "y": 496.0219887131292 }, { "type": "QPointF", - "x": 493.1624730540218, - "y": 498.00078352401664 + "x": 483.1823868029168, + "y": 500.5066198031956 }, { "type": "QPointF", - "x": 476.32590489565666, - "y": 501.8211255823292 + "x": 469.31906002715755, + "y": 502.76699104452376 }, { "type": "QPointF", - "x": 465.68981801438673, - "y": 503.0580521806556 + "x": 458.61213259187986, + "y": 503.1196305607171 }, { "type": "QPointF", - "x": 454.9458499674166, - "y": 502.9444423349683 + "x": 443.8536819162971, + "y": 501.9185119737654 }, { "type": "QPointF", - "x": 439.3060103264079, - "y": 501.3191976012906 + "x": 427.1929958670552, + "y": 499.2248924703412 }, { "type": "QPointF", - "x": 423.2043144587875, - "y": 498.34929359863105 + "x": 415.2822129385592, + "y": 496.2167954717386 }, { "type": "QPointF", - "x": 411.3722974923289, - "y": 494.89048056695367 + "x": 405.51268591803284, + "y": 492.34625734655305 }, { "type": "QPointF", - "x": 404.0462328838181, - "y": 491.56426076213603 + "x": 399.1440538155622, + "y": 488.76255604621974 }, { "type": "QPointF", - "x": 397.6192436403225, - "y": 487.3958668879086 + "x": 397.651509179127, + "y": 487.0589090075787 }, { "type": "QPointF", @@ -382,23 +357,28 @@ }, { "type": "QPointF", - "x": 389.46280257533397, - "y": 476.7991800818359 + "x": 388.7637811139682, + "y": 475.5345799921174 }, { "type": "QPointF", - "x": 385.21740968628404, - "y": 467.7455266773488 + "x": 384.02761759391484, + "y": 464.5866207957423 }, { "type": "QPointF", - "x": 381.98288724618385, - "y": 458.53069141599417 + "x": 380.4304614262938, + "y": 453.47849078579617 }, { "type": "QPointF", - "x": 368.3461454578772, - "y": 411.2975955501923 + "x": 368.49295008766654, + "y": 411.6985932639229 + }, + { + "type": "QPointF", + "x": 367.6462390140756, + "y": 411.29354992278223 }, { "type": "QPointF", @@ -407,8 +387,8 @@ }, { "type": "QPointF", - "x": 354.94905309156206, - "y": 444.28762369139116 + "x": 355.1561846360663, + "y": 443.7676398081635 }, { "type": "QPointF", @@ -417,13 +397,13 @@ }, { "type": "QPointF", - "x": 340.52244605437, - "y": 471.85996007627705 + "x": 339.0381408643451, + "y": 473.9103469636046 }, { "type": "QPointF", - "x": 332.3013407792153, - "y": 481.91406607342856 + "x": 328.4003671533969, + "y": 485.7230912940063 }, { "type": "QPointF", @@ -432,13 +412,13 @@ }, { "type": "QPointF", - "x": 308.4504919589761, - "y": 496.94455134299847 + "x": 306.70041004704234, + "y": 497.47875631537966 }, { "type": "QPointF", - "x": 293.41117665937344, - "y": 500.741531068732 + "x": 290.47717224660175, + "y": 501.3077427754172 }, { "type": "QPointF", @@ -467,48 +447,48 @@ }, { "type": "QPointF", - "x": 220.20894480356736, - "y": 493.9717974895532 + "x": 219.11733302477276, + "y": 493.5618654509618 }, { "type": "QPointF", - "x": 214.23653207492043, - "y": 491.72898244053755 + "x": 212.63608885738194, + "y": 490.0800375140309 }, { "type": "QPointF", - "x": 199.2867956563084, - "y": 474.27137643587264 + "x": 202.91098065710946, + "y": 479.33521360057284 }, { "type": "QPointF", - "x": 193.05436777423637, - "y": 463.35364232842176 + "x": 196.03783581368415, + "y": 468.9566791455622 }, { "type": "QPointF", - "x": 186.4552262793201, - "y": 447.9927324953534 + "x": 188.96153147430664, + "y": 454.3702537301474 }, { "type": "QPointF", - "x": 181.07652203439048, - "y": 431.23130737455057 + "x": 183.1651247359179, + "y": 438.3396830609576 }, { "type": "QPointF", - "x": 176.74074040059125, - "y": 412.44411172139985 + "x": 178.31430533286823, + "y": 420.11842584896306 }, { "type": "QPointF", - "x": 174.31642834550638, - "y": 396.57264472089304 + "x": 174.82594122279494, + "y": 400.59766857295676 }, { "type": "QPointF", - "x": 166.2793358771866, - "y": 317.0063195835933 + "x": 166.02062314300517, + "y": 312.9788859158875 } ] } diff --git a/src/test/ValentinaTest/share/test_data.qrc b/src/test/ValentinaTest/share/test_data.qrc index b0e383255..738852acf 100644 --- a/src/test/ValentinaTest/share/test_data.qrc +++ b/src/test/ValentinaTest/share/test_data.qrc @@ -143,5 +143,7 @@ smart_pattern_#120_piece_1/output.json smart_pattern_#120_piece_2/input.json smart_pattern_#120_piece_2/output.json + smart_pattern_#133/input.json + smart_pattern_#133/output.json diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp index 4a28780eb..022699162 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.cpp +++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp @@ -1053,6 +1053,12 @@ void TST_VAbstractPiece::EquidistantAngleType_data() QStringLiteral("://smart_pattern_#118/input.json"), QStringLiteral("://smart_pattern_#118/output.json"), 26.45669291338583 /*seam allowance width*/); + + // See file src/app/share/collection/bugs/smart_pattern_#133.val (private collection) + ASSERT_TEST_CASE("Эдит 1", + QStringLiteral("://smart_pattern_#133/input.json"), + QStringLiteral("://smart_pattern_#133/output.json"), + 26.45669291338583 /*seam allowance width*/); } //--------------------------------------------------------------------------------------------------------------------- From f5a5fadc527abce63d2d139a7282d251b337a11a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 23 Jun 2021 15:58:43 +0300 Subject: [PATCH 06/32] Optimize calls. --- src/libs/vmisc/vabstractapplication.cpp | 17 ----------------- src/libs/vmisc/vabstractapplication.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index b64817bab..fdd06d088 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -197,17 +197,6 @@ void VAbstractApplication::WinAttachConsole() } #endif -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief getSettings hide settings constructor. - * @return pointer to class for acssesing to settings in ini file. - */ -VCommonSettings *VAbstractApplication::Settings() -{ - SCASSERT(settings != nullptr) - return settings; -} - //--------------------------------------------------------------------------------------------------------------------- void VAbstractApplication::LoadTranslation(const QString &locale) { @@ -326,9 +315,3 @@ QFileDialog::Options VAbstractApplication::NativeFileDialog(QFileDialog::Options return options; } - -//--------------------------------------------------------------------------------------------------------------------- -auto VAbstractApplication::VApp() -> VAbstractApplication * -{ - return qobject_cast(QCoreApplication::instance()); -} diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 12f5167c9..9ee262655 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -120,4 +120,21 @@ inline QString VAbstractApplication::LocaleToString(const T &value) return loc.toString(value); } +//--------------------------------------------------------------------------------------------------------------------- +inline auto VAbstractApplication::VApp() -> VAbstractApplication * +{ + return qobject_cast(QCoreApplication::instance()); +} + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief getSettings hide settings constructor. + * @return pointer to class for acssesing to settings in ini file. + */ +inline VCommonSettings *VAbstractApplication::Settings() +{ + SCASSERT(settings != nullptr) + return settings; +} + #endif // VABSTRACTAPPLICATION_H From 7779e16be38f353fffd9b3e0cee92d0522f4b82b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 28 Jun 2021 10:23:44 +0300 Subject: [PATCH 07/32] Refactoring. --- src/app/valentina/dialogs/dialogsavelayout.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index fcc8221dd..457c181df 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -182,15 +182,13 @@ void DialogSaveLayout::SelectFormat(LayoutExportFormats format) { if (static_cast(format) < 0 || format >= LayoutExportFormats::COUNT) { - VException e(tr("Tried to use out of range format number.")); - throw e; + throw VException(tr("Tried to use out of range format number.")); } const int i = ui->comboBoxFormat->findData(static_cast(format)); if (i < 0) { - VException e(tr("Selected not present format.")); - throw e; + throw VException(tr("Selected not present format.")); } ui->comboBoxFormat->setCurrentIndex(i); } From b2b7dff1067c9d091b56227f28bba12d745af721 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 28 Jun 2021 10:25:52 +0300 Subject: [PATCH 08/32] Fix regression. Fix correct handle export format for exporting details in the Detail mode. --- ChangeLog.txt | 1 + src/app/valentina/dialogs/dialogsavelayout.cpp | 18 ++++++++++++++++-- src/libs/vmisc/vsettings.cpp | 13 +++++++++++++ src/libs/vmisc/vsettings.h | 3 +++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index faed568f1..571d86ced 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,7 @@ - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - Parsing formulas with not canonical math symbols. - [smart-pattern/valentina#133] Incorrect seam allowance. +- Fix regression. Fix correct handle export format for exporting details in the Detail mode. # Version 0.7.47 May 13, 2021 - [smart-pattern/valentina#118] Incorrect seam allowance. diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index 457c181df..3b514ba27 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -914,7 +914,14 @@ void DialogSaveLayout::ReadSettings() ui->toolButtonLandscape->setChecked(true); } - SelectFormat(static_cast(settings->GetLayoutExportFormat())); + if (m_mode != Draw::Layout) + { + SelectFormat(static_cast(settings->GetDetailExportFormat())); + } + else + { + SelectFormat(static_cast(settings->GetLayoutExportFormat())); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -958,6 +965,13 @@ void DialogSaveLayout::WriteSettings() const settings->SetTiledPDFOrientation(PageOrientation::Landscape); } - settings->SetLayoutExportFormat(static_cast(Format())); + if (m_mode != Draw::Layout) + { + settings->SetDetailExportFormat(static_cast(Format())); + } + else + { + settings->SetLayoutExportFormat(static_cast(Format())); + } } diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 446d8605d..8b00db74c 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -104,6 +104,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTextAsPaths, (QLatin1String("lay Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingNestingTime, (QLatin1String("layout/time"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingEfficiencyCoefficient, (QLatin1String("layout/efficiencyCoefficient"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutExportFormat, (QLatin1String("layout/exportFormat"))) +Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDetailExportFormat, (QLatin1String("detail/exportFormat"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperHeight, (QLatin1String("tiledPDF/paperHeight"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingTiledPDFPaperWidth, (QLatin1String("tiledPDF/paperWidth"))) @@ -783,6 +784,18 @@ void VSettings::SetLayoutExportFormat(qint8 format) setValue(*settingLayoutExportFormat, format); } +//--------------------------------------------------------------------------------------------------------------------- +qint8 VSettings::GetDetailExportFormat() const +{ + return qvariant_cast(value(*settingDetailExportFormat, 0)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VSettings::SetDetailExportFormat(qint8 format) +{ + setValue(*settingDetailExportFormat, format); +} + //--------------------------------------------------------------------------------------------------------------------- template T VSettings::GetCachedValue(T &cache, const QString &setting, T defValue, T valueMin, T valueMax) const diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 41841b370..84052b2ec 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -206,6 +206,9 @@ public: auto GetLayoutExportFormat() const -> qint8; void SetLayoutExportFormat(qint8 format); + auto GetDetailExportFormat() const -> qint8; + void SetDetailExportFormat(qint8 format); + private: Q_DISABLE_COPY(VSettings) From c867a9a56edaa0459745fe38a363f596c6e92dc8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 28 Jun 2021 20:05:19 +0300 Subject: [PATCH 09/32] Export the Draw mode. Closes #83 --- ChangeLog.txt | 1 + src/app/valentina/mainwindow.cpp | 84 ++++++++++++++++++++++++ src/app/valentina/mainwindow.h | 3 + src/app/valentina/mainwindow.ui | 24 ++++++- src/libs/ifc/xml/vabstractpattern.cpp | 2 +- src/libs/vlayout/vlayoutexporter.cpp | 13 ++++ src/libs/vlayout/vlayoutexporter.h | 4 ++ src/libs/vwidgets/vmaingraphicsscene.cpp | 4 +- 8 files changed, 130 insertions(+), 5 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 571d86ced..25f72e269 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,7 @@ - Parsing formulas with not canonical math symbols. - [smart-pattern/valentina#133] Incorrect seam allowance. - Fix regression. Fix correct handle export format for exporting details in the Detail mode. +- [smart-pattern/valentina#83] Export the Draw mode. # Version 0.7.47 May 13, 2021 - [smart-pattern/valentina#118] Incorrect seam allowance. diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 86febb45b..d4fe15014 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -67,6 +67,8 @@ #include "../vformat/vpatternrecipe.h" #include "watermarkwindow.h" #include "../vmisc/backport/qoverload.h" +#include "../vlayout/vlayoutexporter.h" +#include "../vwidgets/vgraphicssimpletextitem.h" #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) #include "../vmisc/backport/qscopeguard.h" @@ -2244,6 +2246,62 @@ void MainWindow::StoreDimensions() } } +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ExportDraw(const QString &fileName) +{ + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + + VLayoutExporter exporter; + + QT_WARNING_POP + + exporter.SetFileName(fileName); + + int verticalScrollBarValue = ui->view->verticalScrollBar()->value(); + int horizontalScrollBarValue = ui->view->horizontalScrollBar()->value(); + + QTransform viewTransform = ui->view->transform(); + ui->view->ZoomFitBest(); // Resize all labels + ui->view->repaint(); + ui->view->ZoomOriginal(); // Set to original scale + + // Enable all items on scene + const QList qItems = sceneDraw->items(); + for (auto *item : qItems) + { + item->setEnabled(true); + if (item->type() == VGraphicsSimpleTextItem::Type) + { + auto *text = dynamic_cast(item); + text->setBrush(text->BaseColor()); // Regular update doesn't work on labels + } + } + + ui->view->repaint(); + + sceneDraw->SetOriginsVisible(false); + + const QRectF rect = sceneDraw->VisibleItemsBoundingRect(); + sceneDraw->update(rect); + exporter.SetImageRect(rect); + exporter.SetOffset(rect.topLeft()); // Correct positions to fit SVG view rect + + exporter.ExportToSVG(sceneDraw); + + sceneDraw->SetOriginsVisible(true); + + // Restore scale, scrollbars and current active pattern piece + ui->view->setTransform(viewTransform); + VMainGraphicsView::NewSceneRect(ui->view->scene(), ui->view); + emit ScaleChanged(ui->view->transform().m11()); + + ui->view->verticalScrollBar()->setValue(verticalScrollBarValue); + ui->view->horizontalScrollBar()->setValue(horizontalScrollBarValue); + + doc->ChangeActivPP(doc->GetNameActivPP(), Document::FullParse); +} + //--------------------------------------------------------------------------------------------------------------------- #if defined(Q_OS_MAC) void MainWindow::OpenAt(QAction *where) @@ -2517,6 +2575,7 @@ void MainWindow::InitToolButtons() connect(ui->toolButtonFlippingByAxis, &QToolButton::clicked, this, &MainWindow::ToolFlippingByAxis); connect(ui->toolButtonMove, &QToolButton::clicked, this, &MainWindow::ToolMove); connect(ui->toolButtonMidpoint, &QToolButton::clicked, this, &MainWindow::ToolMidpoint); + connect(ui->toolButtonExportDraw, &QToolButton::clicked, this, &MainWindow::ExportDrawAs); connect(ui->toolButtonLayoutExportAs, &QToolButton::clicked, this, &MainWindow::ExportLayoutAs); connect(ui->toolButtonDetailExportAs, &QToolButton::clicked, this, &MainWindow::ExportDetailsAs); connect(ui->toolButtonEllipticalArc, &QToolButton::clicked, this, &MainWindow::ToolEllipticalArc); @@ -4226,6 +4285,7 @@ QT_WARNING_POP ui->toolButtonPin->setEnabled(drawTools); ui->toolButtonInsertNode->setEnabled(drawTools); ui->toolButtonPlaceLabel->setEnabled(drawTools); + ui->toolButtonExportDraw->setEnabled(drawTools); ui->actionLast_tool->setEnabled(drawTools); @@ -5480,6 +5540,30 @@ void MainWindow::CreateMeasurements() } #endif +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ExportDrawAs() +{ + auto Uncheck = qScopeGuard([this] {ui->toolButtonExportDraw->setChecked(false);}); + + QString filters(tr("Scalable Vector Graphics files") + QLatin1String("(*.svg)")); + QString dir = QDir::homePath() + QLatin1String("/") + FileName() + QLatin1String(".svg"); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save draw"), dir, filters, nullptr, + VAbstractApplication::VApp()->NativeFileDialog()); + + if (fileName.isEmpty()) + { + return; + } + + QFileInfo f( fileName ); + if (f.suffix().isEmpty() || f.suffix() != QLatin1String("svg")) + { + fileName += QLatin1String(".svg"); + } + + ExportDraw(fileName); +} + //--------------------------------------------------------------------------------------------------------------------- void MainWindow::ExportLayoutAs() { diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index 357cded20..b6a9136be 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -130,6 +130,7 @@ private slots: #if defined(Q_OS_MAC) void CreateMeasurements(); #endif + void ExportDrawAs(); void ExportLayoutAs(); void ExportDetailsAs(); @@ -415,6 +416,8 @@ private: void SetDimensionBases(); void StoreDimensions(); + + void ExportDraw(const QString &fileName); }; #endif // MAINWINDOW_H diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index ca14002f7..feb3b4d85 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -1119,9 +1119,9 @@ 0 - 0 + -53 126 - 192 + 237 @@ -1317,6 +1317,26 @@ + + + + false + + + ... + + + + :/icon/32x32/export_to_picture_document.png:/icon/32x32/export_to_picture_document.png + + + + 32 + 32 + + + + diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 21ddcac5b..fa6b96b96 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -291,7 +291,7 @@ QStringList VAbstractPattern::ListMeasurements() const void VAbstractPattern::ChangeActivPP(const QString &name, const Document &parse) { Q_ASSERT_X(not name.isEmpty(), Q_FUNC_INFO, "name pattern piece is empty"); - if (CheckExistNamePP(name) && this->nameActivPP != name) + if (CheckExistNamePP(name)) { this->nameActivPP = name; if (parse == Document::FullParse) diff --git a/src/libs/vlayout/vlayoutexporter.cpp b/src/libs/vlayout/vlayoutexporter.cpp index 42c168cd5..c2daf0ef0 100644 --- a/src/libs/vlayout/vlayoutexporter.cpp +++ b/src/libs/vlayout/vlayoutexporter.cpp @@ -139,6 +139,7 @@ void VLayoutExporter::ExportToSVG(QGraphicsScene *scene) const QPainter painter; painter.begin(&generator); + painter.translate(-m_offset.x(), -m_offset.y()); painter.translate(m_margins.left(), m_margins.top()); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(m_pen); @@ -374,6 +375,18 @@ auto VLayoutExporter::SupportPDFConversion() -> bool return res; } +//--------------------------------------------------------------------------------------------------------------------- +QPointF VLayoutExporter::offset() const +{ + return m_offset; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutExporter::SetOffset(QPointF newOffset) +{ + m_offset = newOffset; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief PdfToPs use external tool "pdftops" for converting pdf too eps or ps format. diff --git a/src/libs/vlayout/vlayoutexporter.h b/src/libs/vlayout/vlayoutexporter.h index af7f8b85d..ed8246c44 100644 --- a/src/libs/vlayout/vlayoutexporter.h +++ b/src/libs/vlayout/vlayoutexporter.h @@ -90,6 +90,9 @@ public: static auto SupportPDFConversion() -> bool; + auto offset() const -> QPointF; + void SetOffset(QPointF newOffset); + private: QString m_fileName{}; QMarginsF m_margins{}; @@ -102,6 +105,7 @@ private: bool m_ignorePrinterMargins{false}; bool m_binaryDxfFormat{false}; int m_dxfVersion{0}; + QPointF m_offset{}; static void PdfToPs(const QStringList ¶ms); }; diff --git a/src/libs/vwidgets/vmaingraphicsscene.cpp b/src/libs/vwidgets/vmaingraphicsscene.cpp index 8e43d0c26..e15d474e2 100644 --- a/src/libs/vwidgets/vmaingraphicsscene.cpp +++ b/src/libs/vwidgets/vmaingraphicsscene.cpp @@ -221,9 +221,9 @@ void VMainGraphicsScene::InitOrigins() //--------------------------------------------------------------------------------------------------------------------- void VMainGraphicsScene::SetOriginsVisible(bool visible) { - for (auto item : qAsConst(origins)) + for (auto *item : qAsConst(origins)) { - if (item) + if (item != nullptr) { item->setVisible(visible); } From 8cb500768846b8e2307a0a37131b031608c2c3d0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 29 Jun 2021 11:57:21 +0300 Subject: [PATCH 10/32] Suppress MSVC warning C5243: 'type-name': using incomplete class 'class-name' can cause potential one definition rule violation due to ABI limitation. --- common.pri | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.pri b/common.pri index 88e7738b8..e1b2e51d2 100644 --- a/common.pri +++ b/common.pri @@ -923,5 +923,7 @@ MSVC_DEBUG_CXXFLAGS += \ -wd4774 \ # format string expected in argument 3 is not a string literal -wd5204 \ # class has virtual functions, but its trivial destructor is not virtual; instances of objects derived # from this class may not be destructed correctly - -wd5219 # implicit conversion from '' to '', possible loss of data + -wd5219 \ # implicit conversion from '' to '', possible loss of data + -wd5243 # 'type-name': using incomplete class 'class-name' can cause potential one definition rule violation due + # to ABI limitation } From 136da97002ae1cb48cf47fe8713497e9ca7309d1 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 29 Jun 2021 12:26:39 +0300 Subject: [PATCH 11/32] Lupdate. --- share/translations/valentina.ts | 18 +- share/translations/valentina_cs_CZ.ts | 26 +- share/translations/valentina_de_DE.ts | 26 +- share/translations/valentina_el_GR.ts | 22 +- share/translations/valentina_en_CA.ts | 22 +- share/translations/valentina_en_IN.ts | 22 +- share/translations/valentina_en_US.ts | 22 +- share/translations/valentina_es_ES.ts | 26 +- share/translations/valentina_fi_FI.ts | 24 +- share/translations/valentina_fr_FR.ts | 262 +++++++++--------- share/translations/valentina_he_IL.ts | 24 +- share/translations/valentina_id_ID.ts | 20 +- share/translations/valentina_it_IT.ts | 56 ++-- share/translations/valentina_nl_NL.ts | 34 ++- share/translations/valentina_pl_PL.ts | 34 ++- share/translations/valentina_pt_BR.ts | 376 ++++++++++++++------------ share/translations/valentina_ro_RO.ts | 24 +- share/translations/valentina_ru_RU.ts | 76 ++++-- share/translations/valentina_uk_UA.ts | 22 +- share/translations/valentina_zh_CN.ts | 20 +- src/app/valentina/mainwindow.ui | 2 +- 21 files changed, 743 insertions(+), 415 deletions(-) diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index 5047f99dc..1aefb0311 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -9593,6 +9593,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -11066,7 +11078,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11959,6 +11971,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index 7613f9e47..bf6974fda 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -9381,6 +9381,18 @@ Chcete uložit své změny? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10800,7 +10812,7 @@ Tato volba se projeví po opětovném spuštění. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Vybrat nový pro vytvoření nového souboru s rozměry.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Vybrat nový pro vytvoření nového souboru s rozměry.</span></p></body></html> Name @@ -11693,6 +11705,10 @@ Chcete uložit změny? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14574,15 +14590,15 @@ Chcete uložit změny? Length - Délka + Délka Angle - Úhel + Úhel Label - Popis + Popis Segment 1 @@ -15469,7 +15485,7 @@ Chcete uložit změny? Label - Popis + Popis Curve 1 segment 1 diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 3262d064b..e2566fccb 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -9378,6 +9378,18 @@ Sollen die Änderungen gespeichert werden? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10797,7 +10809,7 @@ Diese Option wird nach einem Neustart aktiv. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Neu auswählen, um eine neue Maßdatei zu erstellen.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Neu auswählen, um eine neue Maßdatei zu erstellen.</span></p></body></html> Name @@ -11689,6 +11701,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14564,15 +14580,15 @@ Do you want to save your changes? Length - Länge + Länge Angle - Winkel + Winkel Label - Bezeichnung + Bezeichnung Segment 1 @@ -15427,7 +15443,7 @@ Do you want to save your changes? Label - Bezeichnung + Bezeichnung Curve 1 segment 1 diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index 827e01d3b..2ae6d6312 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -9230,6 +9230,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10543,7 +10555,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Επιλέξτε Νέο για τη δημιουργία αρχείου μετρήσεων.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Επιλέξτε Νέο για τη δημιουργία αρχείου μετρήσεων.</span></p></body></html> Name @@ -11408,6 +11420,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14077,11 +14093,11 @@ Do you want to save your changes? Length - Μήκος + Μήκος Angle - Γωνία + Γωνία Label diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index 09ce9dd80..e5997b53a 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -9377,6 +9377,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10795,7 +10807,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11688,6 +11700,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14565,11 +14581,11 @@ Do you want to save your changes? Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index 977bcd6a7..2cbfb99b3 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -9377,6 +9377,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10795,7 +10807,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11688,6 +11700,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14565,11 +14581,11 @@ Do you want to save your changes? Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index bb0243947..e1f3d957a 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -9377,6 +9377,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10795,7 +10807,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> Name @@ -11688,6 +11700,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14565,11 +14581,11 @@ Do you want to save your changes? Length - Length + Length Angle - Angle + Angle Label diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index 90de2e595..a6132ef97 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -9379,6 +9379,18 @@ el patrón. Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10798,7 +10810,7 @@ Esta opción surtirá efecto después de reiniciar. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Seleccione Nuevo para crear un archivo de medidas.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Seleccione Nuevo para crear un archivo de medidas.</span></p></body></html> Name @@ -11691,6 +11703,10 @@ Quieres guardar los cambios? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14572,15 +14588,15 @@ Quieres guardar los cambios? Length - Longitud + Longitud Angle - + Angulo Label - Etiqueta + Etiqueta Segment 1 @@ -15467,7 +15483,7 @@ Quieres guardar los cambios? Label - Etiqueta + Etiqueta Curve 1 segment 1 diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index 78bb53536..bb56efefb 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -8385,6 +8385,18 @@ Haluatko tallentaa muutokset? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -9602,10 +9614,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nimi @@ -10352,6 +10360,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -13003,11 +13015,11 @@ Do you want to save your changes? Length - Pituus + Pituus Angle - Kulma + Kulma Label diff --git a/share/translations/valentina_fr_FR.ts b/share/translations/valentina_fr_FR.ts index 6e7a2b0e1..f67ca3784 100644 --- a/share/translations/valentina_fr_FR.ts +++ b/share/translations/valentina_fr_FR.ts @@ -715,7 +715,7 @@ Alias: - + Alias : @@ -842,7 +842,7 @@ Alias: - + Alias : @@ -1044,7 +1044,7 @@ Alias: - + Alias : @@ -1103,7 +1103,7 @@ Alias: - + Alias : @@ -1214,11 +1214,11 @@ Alias1: - + Alias1 : Alias2: - + Alias2 : @@ -1305,11 +1305,11 @@ Alias1: - + Alias1 : Alias2: - + Alias2 : @@ -1396,11 +1396,11 @@ Alias1: - + Alias1 : Alias2: - + Alias2 : @@ -1487,11 +1487,11 @@ Alias1: - + Alias1 : Alias2: - + Alias2 : @@ -1792,7 +1792,7 @@ DialogDimensionLabels Dimension labels - + Etiquettes de dimensions Value @@ -2103,7 +2103,7 @@ Hip dimension - + Hanche Waist @@ -2133,22 +2133,22 @@ Height label dimension - + Etiquette de hauteur Size label dimension - + Etiquette de taille Hip label dimension - + Etiquette de hanche Waist label dimension - + Etiquette de taille @@ -2287,7 +2287,7 @@ Lengths to control points - + Longueur aux points de contrôle Filter list by keyword @@ -2390,7 +2390,7 @@ Alias: - + Alias : @@ -2604,7 +2604,7 @@ <html><head/><body><p>Show full calculation in message box</p></body></html> - + <html><head/><body><p>Montrer le calcul complet dans une boite de dialogue </p></body></html> Formula wizard @@ -2715,7 +2715,7 @@ Tags: - + Marqueurs: Separate each tag with comma. @@ -2735,7 +2735,7 @@ Alias: - + Alias : Pen style: @@ -2751,7 +2751,7 @@ Invalid suffix - + Suffixe invalide Invalid group name @@ -2759,7 +2759,7 @@ Label: - + Etiquette : Default @@ -2771,7 +2771,7 @@ Invalid label - + Etiquette invalide Invalid alias @@ -2834,7 +2834,7 @@ Tags: - + Marqueurs: Separate each tag with comma. @@ -2854,7 +2854,7 @@ Alias: - + Alias : Pen style: @@ -2870,7 +2870,7 @@ Invalid suffix - + Suffixe invalide Invalid group name @@ -2878,7 +2878,7 @@ Label: - + Etiquette : Default @@ -2898,7 +2898,7 @@ Invalid label - + Etiquette invalide Invalid alias @@ -2929,7 +2929,7 @@ Tags: - + Marqueurs: Separate each tag with comma. @@ -3203,7 +3203,7 @@ Move objects. Suffix '%1' - + Déplacer des objets. Suffixe '%1' @@ -3366,7 +3366,7 @@ Curves control point lengths - + Longueurs des points de contrôle de courbes Invalid result. Value is infinite or NaN. Please, check your calculations. @@ -3386,7 +3386,7 @@ Unique variable name - + Nom unique de variable <html><head/><body><p>Search increments by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search increments by regex.</p></body></html> @@ -3425,14 +3425,14 @@ Number: - + Nombre : DialogKnownMaterials Known materials - + Matériaux connus Material: @@ -3471,26 +3471,26 @@ Nesting. Please, wait. - + Mise en page, merci de patienter. Time left: - + Temps restant : Time left: %1 - + Temps restant : %1 Efficiency coefficient: %1% - + Coefficient d’efficacité: %1% DialogLayoutScale Layout scale - + Echelle de sortie Margins @@ -3518,15 +3518,15 @@ Scale - + Echelle Horizontal: - + horizontal : Vertical: - + vertical : @@ -3761,11 +3761,11 @@ Appliquer les réglages quand-même ? Text will be converted to paths - + Le texte sera converti en tracés Export text as paths - + Exporter le texte en tracés Margins @@ -3773,17 +3773,19 @@ Appliquer les réglages quand-même ? Ignore margins - + Ignorer les marges Margins go beyond printing. Apply settings anyway? - + Les marges s’étendent au-delà de la zone d’impression.. + +Appliquer quand même les réglages ? Follow grainline - + Suivre le droit-fil Time: @@ -3791,11 +3793,11 @@ Apply settings anyway? Time given for the algorithm to find best layout. - + Temps estimé pour que l’algorithme trouve la meilleure mise en page. Efficiency: - + Efficacité : Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. @@ -3803,32 +3805,32 @@ Apply settings anyway? Manual priority - + Priorité manuelle Nest quantity of copies according to piece settings. - + Regrouper le nombre de copies selon les paramètres de la pièce. Nest quantity - + Quantité à regrouper Auto crop unused width - + Rogner automatiquement la largeur non utilisée Prefer one sheet solution - + Préférer la solution à une feuille min minutes - + min Enable this option to prefer getting one sheet solutions. - + Activer cette option pour obtenir des solutions à une feuille. @@ -4252,7 +4254,7 @@ Apply settings anyway? Skip - + Passer Shift (%1)*: @@ -4385,7 +4387,7 @@ Apply settings anyway? Tags: - + Marqueurs: Separate each tag with comma. @@ -4405,7 +4407,7 @@ Apply settings anyway? Alias: - + Alias : Pen style: @@ -4421,7 +4423,7 @@ Apply settings anyway? Invalid suffix - + suffixe invalide Invalid group name @@ -4429,7 +4431,7 @@ Apply settings anyway? Label: - + Etiquette : Default @@ -4441,7 +4443,7 @@ Apply settings anyway? Invalid rotation angle formula - + Formule d’angle de rotation invalide Invalid length formula @@ -4449,7 +4451,7 @@ Apply settings anyway? Invalid label - + Etiquette invalide Invalid alias @@ -4860,7 +4862,7 @@ Apply settings anyway? For technical notes - + Pour les notes techniques Label language: @@ -5178,7 +5180,7 @@ Apply settings anyway? Bisector - + Bissectrice Passmark @@ -5218,7 +5220,7 @@ Apply settings anyway? Cut on fabric - + Couper le tissu Select if need designate the corner point as a passmark. Show only left passmark. @@ -5262,11 +5264,11 @@ Apply settings anyway? Intersection 2 (only left) - + Intersection 2 (gauche seulement) Intersection 2 (only right) - + Intersection 2 (droite seulement) Check uniqueness @@ -5408,7 +5410,7 @@ Apply settings anyway? <html><head/><body><p>Show full calculation in message box</p></body></html> - + <html><head/><body><p>Montrer le calcul complet dans une boite de dialogue </p></body></html> Height: @@ -5424,7 +5426,7 @@ Apply settings anyway? Point: - Point : + Point : Piece: @@ -5432,11 +5434,11 @@ Apply settings anyway? Type: - + Type : Edit rectangle width - + Modifier la largeur du rectangle Edit angle @@ -5452,11 +5454,11 @@ Apply settings anyway? Cross - + Croix T-shaped - + En forme de T Doubletree @@ -5472,7 +5474,7 @@ Apply settings anyway? H-shaped - + En forme de H Button @@ -6061,11 +6063,11 @@ Apply settings anyway? Alias1: - + Alias1: Alias2: - + Alias2 : Curve 2 @@ -6197,7 +6199,7 @@ Apply settings anyway? Tags: - + Marqueurs: Separate each tag with comma. @@ -6233,7 +6235,7 @@ Apply settings anyway? Invalid suffix - + suffixe invalide Invalid group name @@ -6245,7 +6247,7 @@ Apply settings anyway? Invalid label - + Etiquette invalide Invalid alias @@ -6257,11 +6259,11 @@ Apply settings anyway? Label: - + Etiquette : Alias: - + Alias : Default @@ -6324,11 +6326,11 @@ Apply settings anyway? Binary form - + Forme binaire Text as paths - + Texte en tracés Margins @@ -6344,11 +6346,11 @@ Apply settings anyway? Top: - Haut: + Haut : Bottom: - Bas: + Bas : Paper format @@ -6360,7 +6362,7 @@ Apply settings anyway? cm - + cm Templates: @@ -6368,7 +6370,7 @@ Apply settings anyway? Orientation: - + Orientation : Options @@ -6376,15 +6378,15 @@ Apply settings anyway? Scale - + Echelle Horizontal: - + horizontal : Vertical: - + vertical : @@ -6642,11 +6644,11 @@ Apply settings anyway? Cross - + Croix T-shaped - + En forme de T Doubletree @@ -6662,7 +6664,7 @@ Apply settings anyway? H-shaped - + En forme de H Button @@ -6801,7 +6803,7 @@ Apply settings anyway? Hip dimension - + Hanche @@ -7110,7 +7112,7 @@ Apply settings anyway? Alias: - + Alias : @@ -7269,7 +7271,7 @@ Apply settings anyway? Alias: - + Alias : @@ -9374,6 +9376,18 @@ Voulez-vous sauvegarder les changements? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10784,7 +10798,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Sélectionnez Nouveau pour créer un fichier de mesures.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Sélectionnez Nouveau pour créer un fichier de mesures.</span></p></body></html> Name @@ -11581,7 +11595,7 @@ Voulez-vous enregistrer les changements? Dimension labels - + Etiquettes de dimensions The table doesn't provide dimensions @@ -11677,6 +11691,10 @@ Voulez-vous enregistrer les changements? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -11702,7 +11720,7 @@ Voulez-vous enregistrer les changements? <html><head/><body><p>Show full calculation in message box</p></body></html> - + <html><head/><body><p>Montrer le calcul complet dans une boite de dialogue </p></body></html> Length: @@ -11765,7 +11783,7 @@ Voulez-vous enregistrer les changements? <html><head/><body><p>Show full calculation in message box</p></body></html> - + <html><head/><body><p>Montrer le calcul complet dans une boite de dialogue </p></body></html> Height: @@ -11821,7 +11839,7 @@ Voulez-vous enregistrer les changements? Orientation: - + Orientation : Rotation: @@ -11948,7 +11966,7 @@ Voulez-vous enregistrer les changements? Bisector - + Bissectrice Marks @@ -11992,11 +12010,11 @@ Voulez-vous enregistrer les changements? Intersection 2 (only left) - + Intersection 2 (gauche seulement) Intersection 2 (only right) - + Intersection 2 (droite seulement) Acute angle that looks outside of piece @@ -12091,7 +12109,7 @@ Voulez-vous enregistrer les changements? <html><head/><body><p>Show full calculation in message box</p></body></html> - + <html><head/><body><p>Montrer le calcul complet dans une boite de dialogue </p></body></html> Nodes @@ -12518,7 +12536,7 @@ Voulez-vous enregistrer les changements? Hip dimension - + Hanche Chest full circumference @@ -13840,7 +13858,7 @@ Voulez-vous enregistrer les changements? Hip - + Hanche Waist @@ -13919,7 +13937,7 @@ Voulez-vous enregistrer les changements? Bisector - + Bissectrice Intersection @@ -13939,11 +13957,11 @@ Voulez-vous enregistrer les changements? Intersection 2 (only left) - + Intersection 2 (gauche seulement) Intersection 2 (only right) - + Intersection 2 (droite seulement) Passmark mark @@ -14544,15 +14562,15 @@ Voulez-vous enregistrer les changements? Length - Longueur + Longueur Angle - Angle + Angle Label - Étiquette + Étiquette Segment 1 @@ -15357,15 +15375,15 @@ Voulez-vous enregistrer les changements? Alias: - + Alias : Alias1: - + Alias1: Alias2: - + Alias2 : Point of intersection circle and segment @@ -15427,7 +15445,7 @@ Voulez-vous enregistrer les changements? Label - Étiquette + Étiquette Curve 1 segment 1 @@ -17135,7 +17153,7 @@ Voulez-vous enregistrer les changements? Tags: - + Marqueurs: Separate each tag with comma. diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index 85a49d929..c89f8e6c5 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -7410,6 +7410,22 @@ Do you want to save your changes? Could not create recipe file. %1 + + ... + ... + + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -8541,10 +8557,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Calculated value @@ -9239,6 +9251,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 93a7f6348..9f7779378 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -7748,6 +7748,18 @@ Apakah anda ingin menyimpan perubahan anda? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -8879,10 +8891,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nama @@ -9577,6 +9585,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index 0559fcfdb..55c8832ab 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -2691,11 +2691,11 @@ Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -2810,11 +2810,11 @@ Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -4366,11 +4366,11 @@ Applicare la configurazione comunque? Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -6182,11 +6182,11 @@ Applicare la configurazione comunque? Enable to create a visibility gropup from original objects - + Seleziona per creare un Gruppo di Visibilità degli oggetti iniziali Visibility Group - + Gruppo di Visibilità Name: @@ -8853,7 +8853,7 @@ Vuoi salvare i cambiamenti? Contains all visibility groups - + Contiene tutti i Gruppi di Visibilità Show which details will go in layout @@ -9225,7 +9225,7 @@ Vuoi salvare i cambiamenti? Groups of visibility - + Gruppi di Visibilità Export recipe @@ -9367,6 +9367,18 @@ Vuoi salvare i cambiamenti? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10786,7 +10798,7 @@ Questa opzione sarà effettiva dopo il riavvio del programma. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Seleziona nuovo per la creazione di un file delle misure.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Seleziona nuovo per la creazione di un file delle misure.</span></p></body></html> Name @@ -11679,6 +11691,10 @@ Vuoi salvare le tue modifiche? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -11847,11 +11863,11 @@ Vuoi salvare le tue modifiche? Options to control position a pattern label. <b>Not available if a pattern label template is empty</b>. - + Opzione per regolare la visibilità e posizione dell'etichetta. <b>Non disponibile se il modello etichetta non è stato caricato</b>. Pattern label data - + Etichetta con dati del Modello Edit pattern label @@ -11911,7 +11927,7 @@ Vuoi salvare le tue modifiche? Piece label visible - + Attiva/Disattiva Etichetta del Pezzo @@ -12756,7 +12772,7 @@ Vuoi salvare le tue modifiche? Visibility group - + Gruppo di Visibilità default @@ -13636,7 +13652,7 @@ Vuoi salvare le tue modifiche? Restore label position - + Ripristina posizione dell'Etichetta @@ -14477,15 +14493,15 @@ Vuoi salvare le tue modifiche? Length - Lunghezza + Lunghezza Angle - + Angolo Label - Etichetta + Etichetta Segment 1 @@ -15364,7 +15380,7 @@ Vuoi salvare le tue modifiche? Label - Etichetta + Etichetta Curve 1 segment 1 diff --git a/share/translations/valentina_nl_NL.ts b/share/translations/valentina_nl_NL.ts index f9406300e..983f868a8 100644 --- a/share/translations/valentina_nl_NL.ts +++ b/share/translations/valentina_nl_NL.ts @@ -1214,11 +1214,11 @@ Alias1: - Alias1: + Alias1: Alias2: - Alias2: + Alias2: @@ -6066,11 +6066,11 @@ Toch de instellingen aanpassen? Alias1: - Alias1: + Alias1: Alias2: - Alias2: + Alias2: Curve 2 @@ -9378,6 +9378,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10797,7 +10809,7 @@ Deze optie wordt actief na een herstart.. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Selecteer Nieuw voor creëeren maten bestand.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Selecteer Nieuw voor creëeren maten bestand.</span></p></body></html> Name @@ -11690,6 +11702,10 @@ Wil je deze veranderingen opslaan? Restrict first dimension Beperk eerste meting + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14571,15 +14587,15 @@ Wil je deze veranderingen opslaan? Length - Lengte + Lengte Angle - Hoek + Hoek Label - Label + Label Segment 1 @@ -15466,7 +15482,7 @@ Wil je deze veranderingen opslaan? Label - Label + Label Curve 1 segment 1 diff --git a/share/translations/valentina_pl_PL.ts b/share/translations/valentina_pl_PL.ts index a30896b09..9d09d0963 100644 --- a/share/translations/valentina_pl_PL.ts +++ b/share/translations/valentina_pl_PL.ts @@ -1214,11 +1214,11 @@ Alias1: - Odnośnik1: + Odnośnik1: Alias2: - Odnośnik2: + Odnośnik2: @@ -5585,11 +5585,11 @@ Apply settings anyway? Alias1: - Odnośnik1: + Odnośnik1: Alias2: - Odnośnik2: + Odnośnik2: Curve 2 @@ -8522,6 +8522,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -9778,7 +9790,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Wciśnij nowy aby utworzyć plik pomiarów.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Wciśnij nowy aby utworzyć plik pomiarów.</span></p></body></html> Name @@ -10595,6 +10607,10 @@ Czy chcesz zapisać zmiany? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -13224,15 +13240,15 @@ Czy chcesz zapisać zmiany? Length - Długość + Długość Angle - Kąt + Kąt Label - Etykieta + Etykieta Segment 1 @@ -14015,7 +14031,7 @@ Czy chcesz zapisać zmiany? Label - Etykieta + Etykieta Curve 1 segment 1 diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index 0a8a72056..26112e911 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -1214,11 +1214,11 @@ Alias1: - Pseudônimo1: + Pseudônimo1: Alias2: - Pseudônimo2: + Pseudônimo2: @@ -2068,7 +2068,7 @@ Measurements units - Unidade de Medida + Unidade de Medidas Pattern units @@ -2133,22 +2133,22 @@ Height label dimension - etiqueta Altura + rótulo Altura Size label dimension - etiqueta Tamanho + rótulo Tamanho Hip label dimension - etiqueta Quadril + rótulo Quadril Waist label dimension - etiqueta Cintura + rótulo Cintura @@ -2715,7 +2715,7 @@ Tags: - Rótulos: + Tags: Separate each tag with comma. @@ -2723,7 +2723,7 @@ Add tags - Adicionar rótulos + Adicionar tags Tool @@ -2759,7 +2759,7 @@ Label: - Etiqueta: + Rótulo: Default @@ -2771,7 +2771,7 @@ Invalid label - Etiqueta inválida + Rótulo inválido Invalid alias @@ -2834,15 +2834,15 @@ Tags: - Rótulos: + Tags: Separate each tag with comma. - Separe cada rótulo com vírgula. + Separe cada tag com vírgula. Add tags - Adicionar rótulos + Adicionar tags Tool @@ -2878,7 +2878,7 @@ Label: - Etiqueta: + Rótulo: Default @@ -2898,7 +2898,7 @@ Invalid label - Etiqueta inválida + Rótulo inválida Invalid alias @@ -2929,15 +2929,15 @@ Tags: - Rótulos: + Tags: Separate each tag with comma. - Separe cada rótulo com vírgula. + Separe cada tag com vírgula. Add tags - Adicionar rótulos + Adicionar tags @@ -4390,11 +4390,11 @@ Aplicar configurações de qualquer forma? Tags: - Rótulos: + Tags: Separate each tag with comma. - Separe cada rótulo com vírgula. + Separe cada tags com vírgula. Add tags @@ -4434,7 +4434,7 @@ Aplicar configurações de qualquer forma? Label: - Etiqueta: + Rótulo: Default @@ -4454,7 +4454,7 @@ Aplicar configurações de qualquer forma? Invalid label - Etiqueta inválida + Rótulo inválido Invalid alias @@ -4873,7 +4873,7 @@ Aplicar configurações de qualquer forma? Passmark length: - + Tamanho do Pique: @@ -5191,15 +5191,15 @@ Aplicar configurações de qualquer forma? Marks - Marcas + Marcações T mark - Marca T + Marcação T V mark - Marca V + Marcação V Please, select a detail to insert into! @@ -5343,7 +5343,7 @@ Aplicar configurações de qualquer forma? V mark 2 - + Marcação V 2 Select main path objects, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation @@ -5351,7 +5351,7 @@ Aplicar configurações de qualquer forma? Manual length - + comprimento manual Length: @@ -5359,15 +5359,15 @@ Aplicar configurações de qualquer forma? U mark - + Marcação U Box mark - + Marcação quadrada Edit passmark length - + Editar tamanho do pique @@ -6062,19 +6062,19 @@ Aplicar configurações de qualquer forma? Curve 1 - + Curva 1 Alias1: - Pseudônimo1: + Pseudônimo1: Alias2: - Pseudônimo2: + Pseudônimo2: Curve 2 - + Curva 2 @@ -6202,15 +6202,15 @@ Aplicar configurações de qualquer forma? Tags: - Rótulos: + Tags: Separate each tag with comma. - Separe cada rótulo com vírgula. + Separe cada tag com vírgula. Add tags - Adicionar rótulos + Adicionar tags Tool @@ -6250,7 +6250,7 @@ Aplicar configurações de qualquer forma? Invalid label - Etiqueta inválida + Rótulo inválido Invalid alias @@ -6262,7 +6262,7 @@ Aplicar configurações de qualquer forma? Label: - Etiqueta: + Rótulo: Alias: @@ -6699,7 +6699,7 @@ Aplicar configurações de qualquer forma? Edit passmark length - + Editar tamanho do pique The customer name from individual measurements @@ -6707,7 +6707,7 @@ Aplicar configurações de qualquer forma? The customer email from individual measurements - O email do clientes das medidas individuais + O email do cliente das medidas individuais The customer birth date from individual measurements @@ -6726,7 +6726,7 @@ Aplicar configurações de qualquer forma? DialogSetupMultisize Setup multisize measurements - Configurar tabela multi-tamanhos + Configurar medidas multi-tamanhos Use full circumference @@ -7847,7 +7847,7 @@ Aplicar configurações de qualquer forma? The pattern units - Unidades de medida do molde + Unidade de medidas do molde Invalid dimension A base value. @@ -9217,19 +9217,19 @@ Você quer salvar suas mudanças? Increase label font - Aumentar fonte da etiqueta + Aumentar fonte do rótulo Decrease label font - Diminuir fonte da etiqueta + Diminuir fonte do rótulo Original label font - Fonte original da etiqueta + Fonte original do rótulo Hide labels - Esconder etiquetas + Esconder rótulos Groups of visibility @@ -9305,7 +9305,7 @@ Você quer salvar suas mudanças? Watermark - Marca d'água + Marca D'água Load @@ -9375,6 +9375,18 @@ Você quer salvar suas mudanças? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10403,11 +10415,11 @@ Esta opção terá um efeito após o reinício. Cannot calculate passmark length for point '%1'. Reason: %2. - + Impossível calcular tamanho do pique para ponto '%1'. Motivo: %2. Passmark '%1' is not part of piece '%2'. - + Pique '%1' não é parte da peça '%2'. Cannot cast tool with id '%1'. @@ -10459,7 +10471,7 @@ Esta opção terá um efeito após o reinício. Piece name '%1' is not unique. - + Nome da peça '%1' não é único. Error in path '%1'. Calculating segment for curve '%2' has failed. %3 @@ -10762,7 +10774,7 @@ Esta opção terá um efeito após o reinício. SavePlaceLabelOptions save place label options - + salvar opções de localização de rótulo @@ -10794,7 +10806,7 @@ Esta opção terá um efeito após o reinício. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Selecionar Novo para o arquivo de criação de medida.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Selecionar Novo para o arquivo de criação de medida.</span></p></body></html> Name @@ -11687,6 +11699,10 @@ Deseja salvar suas mudanças? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -11859,7 +11875,7 @@ Deseja salvar suas mudanças? Pattern label data - + Informação de rótulo do molde Edit pattern label @@ -11919,7 +11935,7 @@ Deseja salvar suas mudanças? Piece label visible - Etiqueta da peça visível + Rótulo da peça visível @@ -11942,11 +11958,11 @@ Deseja salvar suas mudanças? T mark - Marca T + Marcação T V mark - Marca V + Marcação V Angle @@ -11962,7 +11978,7 @@ Deseja salvar suas mudanças? Marks - Marcas + Marcações Select if need designate the corner point as a passmark @@ -12014,11 +12030,11 @@ Deseja salvar suas mudanças? V mark 2 - + Marcação V 2 Manual length - + comprimento manual Length: @@ -12042,11 +12058,11 @@ Deseja salvar suas mudanças? U mark - + Marcação U Box mark - + Marcação quadrada List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. @@ -12719,7 +12735,7 @@ Deseja salvar suas mudanças? VAbstractMainWindow Confirm format rewriting - + Confirmar reescrever formato This file is using previous format version v%1. The current is v%2. Saving the file with this app version will update the format version for this file. This may prevent you from be able to open the file with older app versions. Do you really want to continue? @@ -12742,7 +12758,7 @@ Deseja salvar suas mudanças? VAbstractNode This id (%1) is not unique. - + Esta id (%1) não é única. @@ -12761,15 +12777,15 @@ Deseja salvar suas mudanças? delete operation - + apagar operação Visibility group - + Grupo de Visibilidade default - + padrão @@ -13308,7 +13324,7 @@ Deseja salvar suas mudanças? The left margin - + margem esquerda Tiled page right margin in current units like 3.0 (export mode). If not set will be used default value 1 cm. @@ -13316,7 +13332,7 @@ Deseja salvar suas mudanças? The right margin - + Margem direita Tiled page top margin in current units like 3.0 (export mode). If not set will be used value default value 1 cm. @@ -13324,7 +13340,7 @@ Deseja salvar suas mudanças? The top margin - + Margem superior Tiled page bottom margin in current units like 3.0 (export mode). If not set will be used value default value 1 cm. @@ -13332,7 +13348,7 @@ Deseja salvar suas mudanças? The bottom margin - + Margem inferior Set tiled page orienatation to landscape (export mode). Default value if not set portrait. @@ -13388,7 +13404,7 @@ Deseja salvar suas mudanças? The page height - + Altura da página Order detail to follow grainline direction (export mode). @@ -13404,7 +13420,7 @@ Deseja salvar suas mudanças? Coefficient - + Coeficiente Time must be in range from 1 minute to 60 minutes. @@ -13495,19 +13511,19 @@ Deseja salvar suas mudanças? individual - + individual multisize - + multi-tamanhos templates - + modelos label templates - + modelos de rótulo patterns @@ -13602,6 +13618,10 @@ Deseja salvar suas mudanças? Got wrong parameter id. Need only id > 0. Obteve parâmetro de identidade errado. Permitido somente Identidade > 0. + + This id is not unique. + Esta id não é única. + Fail to write Canonical XML. @@ -13616,7 +13636,7 @@ Deseja salvar suas mudanças? This id (%1) is not unique. - + Esta id (%1) não é única. Couldn't get version information. @@ -13651,7 +13671,7 @@ Deseja salvar suas mudanças? This id (%1) is not unique. - + Esta id (%1) não é única. Add to group @@ -13667,7 +13687,7 @@ Deseja salvar suas mudanças? Restore label position - Restaurar posição da etiqueta + Restaurar posição do rótulo @@ -13693,34 +13713,34 @@ Deseja salvar suas mudanças? Result is infinite - + Resultado é infinite Result is NaN - + Resultado é NaN Result is zero - + Resultado é zero Result less than zero - + Resultado menor de zero Formula is empty - + Fórmula está vazia Not evaluated - + Não avaliado VFormulaData Not evaluated - + Não avaliado Error @@ -13728,7 +13748,7 @@ Deseja salvar suas mudanças? Formula is empty - + Fórmula está vazia @@ -13746,7 +13766,7 @@ Deseja salvar suas mudanças? VLayoutExporter Cannot set printer page size - + Impossível definir tamanho da página Cannot set printer margins @@ -13754,7 +13774,7 @@ Deseja salvar suas mudanças? Can't open file '%1' - + Impossível abrir arquivo '%1' Creating file '%1' failed! %2 @@ -13762,19 +13782,19 @@ Deseja salvar suas mudanças? Can't save file '%1'. Error: %2. - + Impossível salvar arquivo '%1'. Erro: %2. Can't create an flat dxf file. - + Impossível criar um arquivo flat dxf. Can't create an AAMA dxf file. - + Impossível criar um arquivo AAMA dxf. Can't create an ASTM dxf file. - + Impossível criaram arquivo ASTM dxf. @@ -13875,11 +13895,11 @@ Deseja salvar suas mudanças? Seam allowance angle - + Ângulo margem de costura Passmark angle - + ângulo do pique Straightforward @@ -13915,7 +13935,7 @@ Deseja salvar suas mudanças? Passmark mark - + Marcação de Pique One line @@ -13931,23 +13951,23 @@ Deseja salvar suas mudanças? T mark - Marca T + Marcação T V mark - Marca V + Marcação V V mark 2 - + Marcação V 2 U mark - + Marcação U Box mark - + Marcação quadrada @@ -14258,26 +14278,26 @@ Deseja salvar suas mudanças? Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. - + Valor para medida final '%1' é infinito ou NaN. Por favor, verifique seus cálculos. Unable to create record for final measurement '%1'. Error: %2 - + Impossível criar registro para medida final '%1'. Erro: %2 VPiece Cannot calculate a notch for point '%1' in piece '%2'. - + Não foi possível calcular pique para ponto '%1' na peça '%2'. Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. - + Pique para ponto '%1' em peça '%2' será desabilitado. Comprimento manual é menor que o valor permitido. Main path of piece %1 - + Caminho principal da peça %1 @@ -14296,7 +14316,7 @@ Deseja salvar suas mudanças? Not supported file suffix '%1' - + Arquivo sufixo '%1' não suportado cm @@ -14306,11 +14326,11 @@ Deseja salvar suas mudanças? in unit - + em Cannot open the watermark image. - + Impossível abrir imagem marca d'água. @@ -14349,11 +14369,11 @@ Deseja salvar suas mudanças? Cannot set custom printer page size - + Impossível definir tamanho personalizado da página Cannot set printer page size - + Impossível definir tamanho da página Cannot set printer tiled page size @@ -14508,27 +14528,27 @@ Deseja salvar suas mudanças? VToolCurveIntersectAxis Error calculating point '%1'. There is no intersection with curve '%2' and axis through point '%3' with angle %4° - + Erro calculando ponto '%1'. Não há interseção com a curva '%2' e eixo através do ponto '%3' com ângulo %4° Length - Comprimento + Comprimento Angle - Ângulo + Ângulo Label - Rótulo + Rótulo Segment 1 - + Segmento 1 Segment 2 - + Segmento 2 @@ -14696,7 +14716,7 @@ Deseja salvar suas mudanças? flipping by line - + virar pela linha @@ -14733,7 +14753,7 @@ Deseja salvar suas mudanças? Error calculating point '%1'. Lines (%2;%3) and (%4;%5) have no point of intersection - + Erro calculando ponto '%1'. Linhas (%2;%3) e (%4;%5) não tem ponto de interseção @@ -14752,7 +14772,7 @@ Deseja salvar suas mudanças? Error calculating point '%1'. Line (%2;%3) doesn't have intersection with axis through point '%4' and angle %5° - + Erro calculando ponto '%1'. Linha (%2;%3) não tem interseção com eixo através do ponto '%4' e ângulo %5° @@ -14794,7 +14814,7 @@ Deseja salvar suas mudanças? move - + mover @@ -15356,14 +15376,14 @@ Deseja salvar suas mudanças? VToolPointFromArcAndTangent Error calculating point '%1'. Tangent to arc '%2' from point '%3' cannot be found - + Erro calculando ponto '%1'. Tangente ao arco '%2' do ponto '%3' não encontrado VToolPointFromCircleAndTangent Error calculating point '%1'. Tangent to circle with center '%2' and radius '%3' from point '%4' cannot be found - + Erro calculando ponto '%1'. Tangente ao círculo com centro '%2' e raio '%3' do ponto '%4' não encontrado @@ -15382,48 +15402,48 @@ Deseja salvar suas mudanças? Error calculating point '%1'. Circle with center '%2' and radius '%3' doesn't have intersection with line (%4;%5) - + Erro calculando ponto '%1'. Círculo com centro '%2' e raio '%3' não tem ponto de interseção com linha (%4;%5) VToolPointOfIntersectionArcs Error calculating point '%1'. Arcs '%2' and '%3' have no point of intersection - + Erro calculando ponto '%1'. Arcos '%2' e '%3' não tem ponto de interseção VToolPointOfIntersectionCircles Error calculating point '%1'. Circles with centers in points '%2' and '%3' have no point of intersection - + Erro calculando ponto '%1'. Círculos com centros em pontos '%2' e '%3' não tem ponto de interseção VToolPointOfIntersectionCurves Error calculating point '%1'. Curves '%2' and '%3' have no point of intersection - + Erro calculando ponto '%1'. Curvas '%2' and '%3' não tem ponto de interseção Label - Rótulo + Rótulo Curve 1 segment 1 - + Curva 1 segmento 1 Curve 1 segment 2 - + Curva 1 segmento 2 Curve 2 segment 1 - + Curva 2 segmento 1 Curve 2 segment 2 - + Curva 2 segmento 2 @@ -15438,7 +15458,7 @@ Deseja salvar suas mudanças? rotate - + rotacionar @@ -15513,11 +15533,11 @@ Deseja salvar suas mudanças? This id (%1) is not unique. - + Esta id (%1) não é única. Tool was used after deleting. - + Ferramenta foi utilizada após apagar. @@ -15539,7 +15559,7 @@ Deseja salvar suas mudanças? VToolTriangle Error calculating point '%1'. Point of intersection cannot be found - + Erro calculando ponto '%1'. Ponto de interseção não encontrado @@ -15554,7 +15574,7 @@ Deseja salvar suas mudanças? This id (%1) is not unique. - + Esta id (%1) não é única. @@ -16534,6 +16554,11 @@ Deseja salvar suas mudanças? millimeter mm + + in + inch + em + Line_ Left symbol _ in the name @@ -16602,7 +16627,7 @@ Deseja salvar suas mudanças? CurrentLength Do not add space between words - + ComprimentoAtual acosh @@ -16614,6 +16639,11 @@ Deseja salvar suas mudanças? placeholder tamanho + + height + placeholder + altura + C1LengthSpl_ Left symbol _ in the name @@ -16952,12 +16982,12 @@ Deseja salvar suas mudanças? warning Calculation warning - + alerta Show a warning in calculations function warning - + Mostrar um alerta nos cálculos @@ -17022,15 +17052,15 @@ Deseja salvar suas mudanças? Piece options - + Opções peça Delete piece - + Deletar peça Cannot find piece by id '%1' - + Não é possível encontrar peça id '%1' @@ -17065,15 +17095,15 @@ Deseja salvar suas mudanças? Tags: - Rótulos: + Tags: Separate each tag with comma. - Separe cada rótulo com vírgula. + Separe cada tag com vírgula. Filter by tags - Filtrar por rótulos + Filtrar por tag Preferences @@ -17126,25 +17156,33 @@ Deseja salvar suas mudanças? <b>Point at distance and angle</b>: angle = %1°, length = %2%3; <b>%4</b> - sticking angle, <b>%5</b> - finish creation - + <b>Ponto a distância e ângulo</b>: ângulo = %1°, comprimento = %2%3; <b>%4</b> - fixar ângulo, <b>%5</b> - finalizar VisToolLineIntersectAxis + + <b>Intersection line and axis</b>: angle = %1°; <b>Shift</b> - sticking angle, <b>Enter</b> - finish creation + <b>Interseção linha e eixo</b>: ângulo = %1°; <b>Shift</b> - fixar ângulo, <b>Enter</b> - finaliza criação + <b>Intersection line and axis</b>: angle = %1°; <b>%2</b> - sticking angle, <b>%3</b> - finish creation - + <b>Interseção linha e eixo</b>: ângulo = %1°; <b>%2</b> - fixar ângulo, <b>%3</b> - finalizar VisToolMove + + Length = %1%2, angle = %3°, <b>Shift</b> - sticking angle, <b>Mouse click</b> - finish creation + Comprimento = %1%2, angle = %3°, <b>Shift</b> - fixar ângulo, <b>Mouse click</b> - finaliza criação + Length = %1%2, angle = %3°, <b>%4</b> - sticking angle, <b>Mouse click</b> - finish selecting a position - + Comprimento = %1%2, ângulo = %3°, <b>%4</b> - fixar ângulo, <b>Mouse click</b> - finalizar a seleção da posição Length = %1%2, angle = %3°, rotation angle = %4°, <b>%5</b> - sticking angle, <b>%6</b> - change rotation origin point, <b>Mouse click</b> - finish creating - + Comprimento = %1%2, ângulo = %3°, ângulo de rotação = %4°, <b>%5</b> - fixar ângulo, <b>%6</b> - mudar ponto de origem da rotação, <b>Mouse click</b> - para finalizar @@ -17155,7 +17193,7 @@ Deseja salvar suas mudanças? Rotating angle = %1°, <b>%2</b> - sticking angle, <b>Mouse click</b> - finish creation - + Ângulo de rotação = %1°, <b>%2</b> - fixar ângulo, <b>Mouse click</b> - finalizar @@ -17166,7 +17204,7 @@ Deseja salvar suas mudanças? Use <b>%1</b> for sticking angle! - + Use <b>%1</b> para fixar ângulo! @@ -17185,22 +17223,22 @@ Deseja salvar suas mudanças? <b>Curved path</b>: select three or more points, <b>%1</b> - finish creation - + <b>Caminho curvo</b>: selecione três ou mais pontos, <b>%1</b> - para finalizar Use <b>%1</b> for sticking angle! - + Use <b>%1</b> para fixar ângulo! WatermarkWindow Watermark - Marca d'água + Marca D'água Opacity: - + Opacidade: Text @@ -17212,7 +17250,7 @@ Deseja salvar suas mudanças? watermark text - + texto marca d'água Rotation: @@ -17220,20 +17258,20 @@ Deseja salvar suas mudanças? Font: - + Fonte: The quick brown fox jumps over the lazy dog Use native text to test a font options - + Um pequeno jabuti xereta viu dez cegonhas felizes Edit font - + Editar fonte Image - + Imagem Path: @@ -17241,7 +17279,7 @@ Deseja salvar suas mudanças? path to image - + caminho para imagem Browse… @@ -17249,7 +17287,7 @@ Deseja salvar suas mudanças? Gray color - + Cor Cinza &File @@ -17285,7 +17323,7 @@ Deseja salvar suas mudanças? Watermark image - + Imagem marca d'água File error. @@ -17355,11 +17393,11 @@ Deseja salvar as alterações? untitled.vwm - + sem_titulo.vwm Confirm format rewriting - + Confirmar reescrever formato This file is using previous format version v%1. The current is v%2. Saving the file with this app version will update the format version for this file. This may prevent you from be able to open the file with older app versions. Do you really want to continue? diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index 41f58ef20..7604a8d5c 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -8419,6 +8419,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -9561,10 +9573,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Name Nume @@ -10307,6 +10315,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -12854,11 +12866,11 @@ Do you want to save your changes? Length - Lungime + Lungime Angle - Unghi + Unghi Label diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index b62e15950..d01a0e929 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -1214,11 +1214,11 @@ Alias1: - Псевдоним 1: + Псевдоним 1: Alias2: - Псевдоним 2: + Псевдоним 2: @@ -1792,7 +1792,7 @@ DialogDimensionLabels Dimension labels - Метки измерения + Псевдонимы измерения Value @@ -1800,7 +1800,7 @@ Label - Метка + Псевдоним Dimension: @@ -2133,22 +2133,22 @@ Height label dimension - + Псевдоним роста Size label dimension - + Псевдоним размера Hip label dimension - + Псевдоним бёдер Waist label dimension - + Псевдоним талии @@ -4873,7 +4873,7 @@ Apply settings anyway? Passmark length: - + Длина надсечек: @@ -6062,19 +6062,19 @@ Apply settings anyway? Curve 1 - + Кривая 1 Alias1: - Псевдоним 1: + Псевдоним 1: Alias2: - Псевдоним 2: + Псевдоним 2: Curve 2 - + Кривая 2 @@ -9378,6 +9378,18 @@ Do you want to save your changes? Could not create recipe file. %1 + Не удалось создать файл рецепта. %1 + + + Shop + + + + Scalable Vector Graphics files + + + + Save draw @@ -10500,7 +10512,7 @@ This option will take an affect after restart. Invalid global value for a passmark length. Piece '%1'. Length is less than minimal allowed. - + Недопустимое глобальное значение длины надсечек. Деталь "%1". Длина меньше минимально допустимой. @@ -10799,7 +10811,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Выберите Новый для создания файла мерок.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Выберите Новый для создания файла мерок.</span></p></body></html> Name @@ -11596,7 +11608,7 @@ Do you want to save your changes? Dimension labels - Метки измерения + Псевдонимы измерения The table doesn't provide dimensions @@ -11692,6 +11704,10 @@ Do you want to save your changes? Restrict first dimension Ограничить первое измерение + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -13823,15 +13839,15 @@ Do you want to save your changes? Can't create an flat dxf file. - + Невозможно создать плоский файл dxf. Can't create an AAMA dxf file. - + Не удалось создать файл AAMA dxf. Can't create an ASTM dxf file. - + Не удалось создать файл ASTM dxf. @@ -14319,7 +14335,7 @@ Do you want to save your changes? Unable to create record for final measurement '%1'. Error: %2 - + Невозможно создать запись для финального измерения "%1'". Ошибка: %2 @@ -14573,23 +14589,23 @@ Do you want to save your changes? Length - Длина + Длина Angle - Угол + Угол Label - Метка + Метка Segment 1 - + Сегмент 1 Segment 2 - + Сегмент 2 @@ -15468,23 +15484,23 @@ Do you want to save your changes? Label - Метка + Метка Curve 1 segment 1 - + Кривая 1 сегмент 1 Curve 1 segment 2 - + Кривая 1 сегмент 2 Curve 2 segment 1 - + Кривая 2 сегмент 1 Curve 2 segment 2 - + Кривая 2 сегмент 2 diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 5ffb5ab8c..73c162b65 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -9378,6 +9378,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -10796,7 +10808,7 @@ This option will take an affect after restart. TMainWindow <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - <html><head/><body><p><span style=" font-size:18pt;">Виберіть Новий для створення файлу мірок.</span></p></body></html> + <html><head/><body><p><span style=" font-size:18pt;">Виберіть Новий для створення файлу мірок.</span></p></body></html> Name @@ -11689,6 +11701,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline @@ -14564,11 +14580,11 @@ Do you want to save your changes? Length - Довжина + Довжина Angle - Кут + Кут Label diff --git a/share/translations/valentina_zh_CN.ts b/share/translations/valentina_zh_CN.ts index 58b27f92b..28f930659 100644 --- a/share/translations/valentina_zh_CN.ts +++ b/share/translations/valentina_zh_CN.ts @@ -7536,6 +7536,18 @@ Do you want to save your changes? Could not create recipe file. %1 + + Shop + + + + Scalable Vector Graphics files + + + + Save draw + + MainWindowsNoGUI @@ -8685,10 +8697,6 @@ This option will take an affect after restart. TMainWindow - - <html><head/><body><p><span style=" font-size:18pt;">Select New for creation measurement file.</span></p></body></html> - - Calculated value @@ -9395,6 +9403,10 @@ Do you want to save your changes? Restrict first dimension + + <html><head/><body><p><span style=" font-size:18pt;">Select New to create a measurement file.</span></p></body></html> + + TabGrainline diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index feb3b4d85..65b2c9498 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -1323,7 +1323,7 @@ false - ... + ... From da3e6a8dd740c354edda9f503f8e0b51ae294550 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 29 Jun 2021 17:31:40 +0300 Subject: [PATCH 12/32] Bump version. --- ChangeLog.txt | 2 +- dist/OBS_debian/debian.changelog | 4 ++-- dist/OBS_debian/valentina.dsc | 7 ++++--- dist/debian/changelog | 4 ++-- dist/macx/tape/Info.plist | 4 ++-- dist/macx/valentina/Info.plist | 4 ++-- dist/rpm/_service | 2 +- dist/rpm/valentina.spec | 2 +- dist/valentina.dsc | 6 +++--- src/libs/vmisc/projectversion.cpp | 2 +- src/libs/vmisc/projectversion.h | 4 ++-- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 25f72e269..018eff5f0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,4 @@ -# Valentina 0.7.48 (unreleased) +# Valentina 0.7.48 June 29, 2021 - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - Parsing formulas with not canonical math symbols. - [smart-pattern/valentina#133] Incorrect seam allowance. diff --git a/dist/OBS_debian/debian.changelog b/dist/OBS_debian/debian.changelog index f1be558f7..fdafefa20 100644 --- a/dist/OBS_debian/debian.changelog +++ b/dist/OBS_debian/debian.changelog @@ -1,5 +1,5 @@ -valentina (0.7.47) trusty; urgency=low +valentina (0.7.48) trusty; urgency=low * Auto build. - -- dismine Fri, 13 May 2021 14:17:00 +0300 + -- dismine Tue, 29 June 2021 17:26:00 +0300 diff --git a/dist/OBS_debian/valentina.dsc b/dist/OBS_debian/valentina.dsc index b2c6ea437..15e83c075 100644 --- a/dist/OBS_debian/valentina.dsc +++ b/dist/OBS_debian/valentina.dsc @@ -2,7 +2,7 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.47 +Version: 0.7.48 Maintainer: Roman Telezhynskyi Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 @@ -14,8 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.47.v0.7.47.tar.gz +Debtransform-Tar: valentina-0.7.48.v0.7.48.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.47.v0.7.47.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.48.v0.7.48.tar.gz + diff --git a/dist/debian/changelog b/dist/debian/changelog index f1be558f7..fdafefa20 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,5 +1,5 @@ -valentina (0.7.47) trusty; urgency=low +valentina (0.7.48) trusty; urgency=low * Auto build. - -- dismine Fri, 13 May 2021 14:17:00 +0300 + -- dismine Tue, 29 June 2021 17:26:00 +0300 diff --git a/dist/macx/tape/Info.plist b/dist/macx/tape/Info.plist index 31a1037a9..ed820861f 100755 --- a/dist/macx/tape/Info.plist +++ b/dist/macx/tape/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.47 + 0.7.48 CFBundleVersion - 0.7.47.0 + 0.7.48.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/macx/valentina/Info.plist b/dist/macx/valentina/Info.plist index a5401e0ff..8aa4b2b9e 100755 --- a/dist/macx/valentina/Info.plist +++ b/dist/macx/valentina/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.47 + 0.7.48 CFBundleVersion - 0.7.47.0 + 0.7.48.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/rpm/_service b/dist/rpm/_service index e5fbaf6db..7551293f3 100644 --- a/dist/rpm/_service +++ b/dist/rpm/_service @@ -1,7 +1,7 @@ git://github.com/dismine/Valentina_git.git - 0.7.47 + 0.7.48 valentina git .git diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index 328c78c10..16e0bc13b 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -95,7 +95,7 @@ Requires: poppler-tools Requires: poppler-utils %endif -Version: 0.7.47 +Version: 0.7.48 Release: 0 URL: https://gitlab.com/smart-pattern/valentina License: GPL-3.0+ diff --git a/dist/valentina.dsc b/dist/valentina.dsc index 076282eef..15e83c075 100644 --- a/dist/valentina.dsc +++ b/dist/valentina.dsc @@ -2,7 +2,7 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.47 +Version: 0.7.48 Maintainer: Roman Telezhynskyi Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 @@ -14,9 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.47.v0.7.47.tar.gz +Debtransform-Tar: valentina-0.7.48.v0.7.48.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.47.v0.7.47.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.48.v0.7.48.tar.gz diff --git a/src/libs/vmisc/projectversion.cpp b/src/libs/vmisc/projectversion.cpp index 05ed47232..fdc22a645 100644 --- a/src/libs/vmisc/projectversion.cpp +++ b/src/libs/vmisc/projectversion.cpp @@ -42,7 +42,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 7; -extern const int DEBUG_VERSION = 47; +extern const int DEBUG_VERSION = 48; extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION) .arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE)); diff --git a/src/libs/vmisc/projectversion.h b/src/libs/vmisc/projectversion.h index 716fa6acf..1437acdc9 100644 --- a/src/libs/vmisc/projectversion.h +++ b/src/libs/vmisc/projectversion.h @@ -49,8 +49,8 @@ extern const QString APP_VERSION_STR; // Change version number in projectversion.cpp too. // Synchronize valentina.nsi -#define VER_FILEVERSION 0,7,47 -#define VER_FILEVERSION_STR "0.7.47\0" +#define VER_FILEVERSION 0,7,48 +#define VER_FILEVERSION_STR "0.7.48\0" #define V_PRERELEASE // Mark prerelease builds From 391a721d84fa18b48607b6dc0f034b2651d3ab9d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jul 2021 16:03:38 +0300 Subject: [PATCH 13/32] Fix GCC warnings. --- src/app/valentina/mainwindowsnogui.cpp | 12 ++++++++++++ src/libs/vtest/abstracttest.cpp | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index a61dfea90..6df6607e9 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -659,7 +659,13 @@ void MainWindowsNoGUI::ExportApparelLayout(const QVector &details, VAbstractValApplication::VApp()->ValentinaSettings()->SetPathLayout(path); const LayoutExportFormats format = m_dialogSaveLayout->Format(); + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + VLayoutExporter exporter; + + QT_WARNING_POP + exporter.SetFileName(name); exporter.SetImageRect(QRectF(0, 0, size.width(), size.height())); exporter.SetXScale(m_dialogSaveLayout->GetXScale()); @@ -1090,7 +1096,13 @@ void MainWindowsNoGUI::ExportScene(const QList &scenes, const QList > &details, bool ignorePrinterFields, const QMarginsF &margins) const { + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wnoexcept") + VLayoutExporter exporter; + + QT_WARNING_POP + exporter.SetMargins(margins); exporter.SetXScale(m_dialogSaveLayout->GetXScale()); exporter.SetYScale(m_dialogSaveLayout->GetYScale()); diff --git a/src/libs/vtest/abstracttest.cpp b/src/libs/vtest/abstracttest.cpp index 13cf270b0..84907a2cc 100644 --- a/src/libs/vtest/abstracttest.cpp +++ b/src/libs/vtest/abstracttest.cpp @@ -241,12 +241,12 @@ void AbstractTest::PassmarkDataFromJson(const QString &json, VPiecePassmarkData AbstractTest::ReadStringValue(passmarkData, QStringLiteral("pieceName"), pieceName); data.pieceName = pieceName; - PassmarkLineType passmarkLineType; + PassmarkLineType passmarkLineType = PassmarkLineType::OneLine; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkLineType"), passmarkLineType, QString::number(static_cast(PassmarkLineType::OneLine))); data.passmarkLineType = passmarkLineType; - PassmarkAngleType passmarkAngleType; + PassmarkAngleType passmarkAngleType = PassmarkAngleType::Straightforward; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkAngleType"), passmarkAngleType, QString::number(static_cast(PassmarkAngleType::Straightforward))); data.passmarkAngleType = passmarkAngleType; @@ -259,11 +259,11 @@ void AbstractTest::PassmarkDataFromJson(const QString &json, VPiecePassmarkData AbstractTest::ReadBooleanValue(passmarkData, QStringLiteral("isShowSecondPassmark"), isShowSecondPassmark); data.isShowSecondPassmark = isShowSecondPassmark; - int passmarkIndex; + int passmarkIndex = -1; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("passmarkIndex"), passmarkIndex, QStringLiteral("-1")); data.passmarkIndex = passmarkIndex; - vidtype id; + vidtype id = NULL_ID; AbstractTest::ReadDoubleValue(passmarkData, QStringLiteral("id"), id, QString::number(NULL_ID)); data.id = id; @@ -891,7 +891,7 @@ void AbstractTest::SAPointFromJson(const QJsonObject &itemObject, VSAPoint &poin AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("saAfter"), saAfter, QStringLiteral("-1")); point.SetSAAfter(saAfter); - PieceNodeAngle angleType; + PieceNodeAngle angleType = PieceNodeAngle::ByLength; AbstractTest::ReadDoubleValue(itemObject, QStringLiteral("angle"), angleType, QString::number(static_cast(PieceNodeAngle::ByLength))); point.SetAngleType(angleType); From 7ea984f1949594806ab156dcbf2aabef1ef4097d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jul 2021 16:54:49 +0300 Subject: [PATCH 14/32] Fix crash. --- ChangeLog.txt | 3 +++ src/libs/vwidgets/vgraphicssimpletextitem.cpp | 17 ++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 018eff5f0..71e34807a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +# Valentina 0.7.49 (unreleased) +- Fix crash. + # Valentina 0.7.48 June 29, 2021 - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. - Parsing formulas with not canonical math symbols. diff --git a/src/libs/vwidgets/vgraphicssimpletextitem.cpp b/src/libs/vwidgets/vgraphicssimpletextitem.cpp index 3c3167b0a..2f83e85b2 100644 --- a/src/libs/vwidgets/vgraphicssimpletextitem.cpp +++ b/src/libs/vwidgets/vgraphicssimpletextitem.cpp @@ -125,14 +125,17 @@ void VGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphic void VGraphicsSimpleTextItem::setEnabled(bool enabled) { QGraphicsSimpleTextItem::setEnabled(enabled); - const QPalette palet = this->scene()->palette(); - if (enabled) + if (this->scene()) { - setBrush(palet.brush(QPalette::Active, QPalette::Text)); - } - else - { - setBrush(palet.brush(QPalette::Disabled, QPalette::Text)); + const QPalette palet = this->scene()->palette(); + if (enabled) + { + setBrush(palet.brush(QPalette::Active, QPalette::Text)); + } + else + { + setBrush(palet.brush(QPalette::Disabled, QPalette::Text)); + } } } From 738e2a4b294cae732d413850d62654e0906b2d2c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jul 2021 17:03:08 +0300 Subject: [PATCH 15/32] Add tooltip for Export draw feature. --- ChangeLog.txt | 1 + src/app/valentina/mainwindow.ui | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 71e34807a..90b235305 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ # Valentina 0.7.49 (unreleased) - Fix crash. +- Add tooltip for Export draw feature. # Valentina 0.7.48 June 29, 2021 - [smart-pattern/valentina#129] Incorrect behavior of empty arc and elliptical arc. diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index 65b2c9498..53bf8b65c 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -1322,6 +1322,9 @@ false + + Draw export + ... From 6c2f1bda6e0780f8d9a8fd1a93fa7d039ec01191 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jul 2021 17:02:17 +0300 Subject: [PATCH 16/32] Lupdate. --- share/translations/valentina.ts | 4 ++++ share/translations/valentina_cs_CZ.ts | 4 ++++ share/translations/valentina_de_DE.ts | 4 ++++ share/translations/valentina_el_GR.ts | 4 ++++ share/translations/valentina_en_CA.ts | 4 ++++ share/translations/valentina_en_IN.ts | 4 ++++ share/translations/valentina_en_US.ts | 4 ++++ share/translations/valentina_es_ES.ts | 4 ++++ share/translations/valentina_fi_FI.ts | 4 ++++ share/translations/valentina_fr_FR.ts | 4 ++++ share/translations/valentina_he_IL.ts | 4 ++++ share/translations/valentina_id_ID.ts | 4 ++++ share/translations/valentina_it_IT.ts | 4 ++++ share/translations/valentina_nl_NL.ts | 4 ++++ share/translations/valentina_pl_PL.ts | 4 ++++ share/translations/valentina_pt_BR.ts | 4 ++++ share/translations/valentina_ro_RO.ts | 4 ++++ share/translations/valentina_ru_RU.ts | 4 ++++ share/translations/valentina_uk_UA.ts | 4 ++++ share/translations/valentina_zh_CN.ts | 4 ++++ 20 files changed, 80 insertions(+) diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index 1aefb0311..cbf1fcf7d 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -9605,6 +9605,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index bf6974fda..6252816ee 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -9393,6 +9393,10 @@ Chcete uložit své změny? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index e2566fccb..9648829f9 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -9390,6 +9390,10 @@ Sollen die Änderungen gespeichert werden? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index 2ae6d6312..6b0b24a75 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -9242,6 +9242,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index e5997b53a..60b5ea23c 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -9389,6 +9389,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index 2cbfb99b3..185495b20 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -9389,6 +9389,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index e1f3d957a..911196cbb 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -9389,6 +9389,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index a6132ef97..4e71cb2e1 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -9391,6 +9391,10 @@ el patrón. Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index bb56efefb..3593ab9aa 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -8397,6 +8397,10 @@ Haluatko tallentaa muutokset? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_fr_FR.ts b/share/translations/valentina_fr_FR.ts index f67ca3784..0ab5d502e 100644 --- a/share/translations/valentina_fr_FR.ts +++ b/share/translations/valentina_fr_FR.ts @@ -9388,6 +9388,10 @@ Voulez-vous sauvegarder les changements? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index c89f8e6c5..90ac3a854 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -7426,6 +7426,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 9f7779378..b4ebe7a88 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -7760,6 +7760,10 @@ Apakah anda ingin menyimpan perubahan anda? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index 55c8832ab..e959c3285 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -9379,6 +9379,10 @@ Vuoi salvare i cambiamenti? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_nl_NL.ts b/share/translations/valentina_nl_NL.ts index 983f868a8..5a4a01e23 100644 --- a/share/translations/valentina_nl_NL.ts +++ b/share/translations/valentina_nl_NL.ts @@ -9390,6 +9390,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_pl_PL.ts b/share/translations/valentina_pl_PL.ts index 9d09d0963..bc1a60bff 100644 --- a/share/translations/valentina_pl_PL.ts +++ b/share/translations/valentina_pl_PL.ts @@ -8534,6 +8534,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index 26112e911..99991f337 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -9387,6 +9387,10 @@ Você quer salvar suas mudanças? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index 7604a8d5c..e0cfbb0dc 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -8431,6 +8431,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index d01a0e929..ebafd9ae8 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -9392,6 +9392,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 73c162b65..385e78770 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -9390,6 +9390,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI diff --git a/share/translations/valentina_zh_CN.ts b/share/translations/valentina_zh_CN.ts index 28f930659..fd8286886 100644 --- a/share/translations/valentina_zh_CN.ts +++ b/share/translations/valentina_zh_CN.ts @@ -7548,6 +7548,10 @@ Do you want to save your changes? Save draw + + Draw export + + MainWindowsNoGUI From 5b7e98bf48a86e3c444423a9f03533440a39aad9 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jul 2021 17:12:34 +0300 Subject: [PATCH 17/32] Bump version. --- ChangeLog.txt | 2 +- dist/OBS_debian/debian.changelog | 4 ++-- dist/OBS_debian/valentina.dsc | 6 +++--- dist/debian/changelog | 4 ++-- dist/macx/tape/Info.plist | 4 ++-- dist/macx/valentina/Info.plist | 4 ++-- dist/rpm/_service | 2 +- dist/rpm/valentina.spec | 2 +- dist/valentina.dsc | 6 +++--- src/libs/vmisc/projectversion.cpp | 2 +- src/libs/vmisc/projectversion.h | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 90b235305..6ad52aea1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,4 @@ -# Valentina 0.7.49 (unreleased) +# Valentina 0.7.49 July 1, 2021 - Fix crash. - Add tooltip for Export draw feature. diff --git a/dist/OBS_debian/debian.changelog b/dist/OBS_debian/debian.changelog index fdafefa20..ff03d5721 100644 --- a/dist/OBS_debian/debian.changelog +++ b/dist/OBS_debian/debian.changelog @@ -1,5 +1,5 @@ -valentina (0.7.48) trusty; urgency=low +valentina (0.7.49) trusty; urgency=low * Auto build. - -- dismine Tue, 29 June 2021 17:26:00 +0300 + -- dismine Tue, 1 July 2021 17:08:00 +0300 diff --git a/dist/OBS_debian/valentina.dsc b/dist/OBS_debian/valentina.dsc index 15e83c075..458c90a80 100644 --- a/dist/OBS_debian/valentina.dsc +++ b/dist/OBS_debian/valentina.dsc @@ -2,7 +2,7 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.48 +Version: 0.7.49 Maintainer: Roman Telezhynskyi Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 @@ -14,9 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.48.v0.7.48.tar.gz +Debtransform-Tar: valentina-0.7.49.v0.7.49.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.48.v0.7.48.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.49.v0.7.49.tar.gz diff --git a/dist/debian/changelog b/dist/debian/changelog index fdafefa20..ff03d5721 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,5 +1,5 @@ -valentina (0.7.48) trusty; urgency=low +valentina (0.7.49) trusty; urgency=low * Auto build. - -- dismine Tue, 29 June 2021 17:26:00 +0300 + -- dismine Tue, 1 July 2021 17:08:00 +0300 diff --git a/dist/macx/tape/Info.plist b/dist/macx/tape/Info.plist index ed820861f..96b39e57b 100755 --- a/dist/macx/tape/Info.plist +++ b/dist/macx/tape/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.48 + 0.7.49 CFBundleVersion - 0.7.48.0 + 0.7.49.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/macx/valentina/Info.plist b/dist/macx/valentina/Info.plist index 8aa4b2b9e..84b551f86 100755 --- a/dist/macx/valentina/Info.plist +++ b/dist/macx/valentina/Info.plist @@ -19,9 +19,9 @@ CFBundleIdentifier io.bitbucket.valentinaproject.@EXECUTABLE@ CFBundleShortVersionString - 0.7.48 + 0.7.49 CFBundleVersion - 0.7.48.0 + 0.7.49.0 CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes diff --git a/dist/rpm/_service b/dist/rpm/_service index 7551293f3..c8a5b7ff8 100644 --- a/dist/rpm/_service +++ b/dist/rpm/_service @@ -1,7 +1,7 @@ git://github.com/dismine/Valentina_git.git - 0.7.48 + 0.7.49 valentina git .git diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index 16e0bc13b..633383937 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -95,7 +95,7 @@ Requires: poppler-tools Requires: poppler-utils %endif -Version: 0.7.48 +Version: 0.7.49 Release: 0 URL: https://gitlab.com/smart-pattern/valentina License: GPL-3.0+ diff --git a/dist/valentina.dsc b/dist/valentina.dsc index 15e83c075..458c90a80 100644 --- a/dist/valentina.dsc +++ b/dist/valentina.dsc @@ -2,7 +2,7 @@ Format: 3.0 (native) Source: valentina Binary: valentina Architecture: i386 amd64 -Version: 0.7.48 +Version: 0.7.49 Maintainer: Roman Telezhynskyi Homepage: https://smart-pattern.com.ua Standards-Version: 3.9.5 @@ -14,9 +14,9 @@ Build-Depends: debhelper (>= 8.0.0), qttools5-dev-tools (>= 5.4.0), libqt5xmlpatterns5-dev (>= 5.4.0), libqt5opengl5-dev (>= 5.4.0) -Debtransform-Tar: valentina-0.7.48.v0.7.48.tar.gz +Debtransform-Tar: valentina-0.7.49.v0.7.49.tar.gz Package-List: valentina deb graphics optional Files: - 00000000000000000000000000000000 0 valentina-0.7.48.v0.7.48.tar.gz + 00000000000000000000000000000000 0 valentina-0.7.49.v0.7.49.tar.gz diff --git a/src/libs/vmisc/projectversion.cpp b/src/libs/vmisc/projectversion.cpp index fdc22a645..83eae94bf 100644 --- a/src/libs/vmisc/projectversion.cpp +++ b/src/libs/vmisc/projectversion.cpp @@ -42,7 +42,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 7; -extern const int DEBUG_VERSION = 48; +extern const int DEBUG_VERSION = 49; extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION) .arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE)); diff --git a/src/libs/vmisc/projectversion.h b/src/libs/vmisc/projectversion.h index 1437acdc9..ec58c3799 100644 --- a/src/libs/vmisc/projectversion.h +++ b/src/libs/vmisc/projectversion.h @@ -49,8 +49,8 @@ extern const QString APP_VERSION_STR; // Change version number in projectversion.cpp too. // Synchronize valentina.nsi -#define VER_FILEVERSION 0,7,48 -#define VER_FILEVERSION_STR "0.7.48\0" +#define VER_FILEVERSION 0,7,49 +#define VER_FILEVERSION_STR "0.7.49\0" #define V_PRERELEASE // Mark prerelease builds From d280f6a2bbde075ddb609e751db95dd8c6d499ad Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 9 Jul 2021 10:42:09 +0300 Subject: [PATCH 18/32] Fix regression. Minimal seam allowance width is less than the point accuracy values. --- ChangeLog.txt | 3 +++ src/libs/vlayout/vabstractpiece.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6ad52aea1..1ba74971a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +# Valentina 0.7.50 (unreleased) +- Fix regression. Minimal seam allowance width is less than the point accuracy values. + # Valentina 0.7.49 July 1, 2021 - Fix crash. - Add tooltip for Export draw feature. diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 462dfeac4..f814e65b6 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -55,7 +55,7 @@ const qreal maxL = 3.5; const qreal VSAPoint::passmarkFactor = 0.5; const qreal VSAPoint::maxPassmarkLength = (10/*mm*/ / 25.4) * PrintDPI; -const qreal VSAPoint::minSAWidth = ToPixel(0.015, Unit::Cm); +const qreal VSAPoint::minSAWidth = accuracyPointOnLine + accuracyPointOnLine*0.5; namespace { From a1d4ea13c4f938deea8907a8ec94a0713e5b6dd4 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 9 Jul 2021 15:31:35 +0300 Subject: [PATCH 19/32] Call autosave only in GUI mode. --- ChangeLog.txt | 1 + src/app/valentina/mainwindow.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1ba74971a..471c2e4ff 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ # Valentina 0.7.50 (unreleased) - Fix regression. Minimal seam allowance width is less than the point accuracy values. +- Call autosave only in GUI mode. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index d4fe15014..065ac4fa1 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -4372,7 +4372,8 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error) */ void MainWindow::AutoSavePattern() { - if (not VAbstractValApplication::VApp()->GetPatternPath().isEmpty() && isWindowModified() && isNeedAutosave) + if (VApplication::VApp()->IsGUIMode() && not VAbstractValApplication::VApp()->GetPatternPath().isEmpty() + && isWindowModified() && isNeedAutosave) { qCDebug(vMainWindow, "Autosaving pattern."); QString error; From 7043d5985882d5aa9ae2ccbce8f1c4dc3f588c80 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 9 Jul 2021 15:38:53 +0300 Subject: [PATCH 20/32] Warn about stale layout only in GUI mode. --- ChangeLog.txt | 1 + src/libs/vlayout/vprintlayout.cpp | 29 +++++++++++++++++------------ src/libs/vlayout/vprintlayout.h | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 471c2e4ff..a29344b0b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,7 @@ # Valentina 0.7.50 (unreleased) - Fix regression. Minimal seam allowance width is less than the point accuracy values. - Call autosave only in GUI mode. +- Warn about stale layout only in GUI mode. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vlayout/vprintlayout.cpp b/src/libs/vlayout/vprintlayout.cpp index 576ec0f23..b1b09ba4b 100644 --- a/src/libs/vlayout/vprintlayout.cpp +++ b/src/libs/vlayout/vprintlayout.cpp @@ -744,16 +744,21 @@ auto VPrintLayout::WatermarkData() const -> VWatermarkData //--------------------------------------------------------------------------------------------------------------------- auto VPrintLayout::ContinueIfLayoutStale(QWidget *parent) -> int { - QMessageBox msgBox(parent); - msgBox.setIcon(QMessageBox::Question); - msgBox.setWindowTitle(tr("The layout is stale.")); - msgBox.setText(tr("The layout was not updated since last pattern modification. Do you want to continue?")); - msgBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - const int width = 500; - auto* horizontalSpacer = new QSpacerItem(width, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - auto* layout = qobject_cast(msgBox.layout()); - SCASSERT(layout != nullptr) - layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); - return msgBox.exec(); + if (VAbstractApplication::VApp()->IsAppInGUIMode()) + { + QMessageBox msgBox(parent); + msgBox.setIcon(QMessageBox::Question); + msgBox.setWindowTitle(tr("The layout is stale.")); + msgBox.setText(tr("The layout was not updated since last pattern modification. Do you want to continue?")); + msgBox.setStandardButtons(QMessageBox::Yes|QMessageBox::No); + msgBox.setDefaultButton(QMessageBox::No); + const int width = 500; + auto* horizontalSpacer = new QSpacerItem(width, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + auto* layout = qobject_cast(msgBox.layout()); + SCASSERT(layout != nullptr) + layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); + return msgBox.exec(); + } + + return QMessageBox::Yes; } diff --git a/src/libs/vlayout/vprintlayout.h b/src/libs/vlayout/vprintlayout.h index f4cc8e12c..f23e914ab 100644 --- a/src/libs/vlayout/vprintlayout.h +++ b/src/libs/vlayout/vprintlayout.h @@ -138,7 +138,7 @@ private: bool m_isAutoCropWidth{false}; bool m_isUnitePages{false}; QString m_layoutPrinterName{}; - bool m_isLayoutStale{true}; + bool m_isLayoutStale{false}; QMarginsF m_tiledMargins{}; PageOrientation m_tiledPDFOrientation{PageOrientation::Portrait}; QSizeF m_tiledPDFPaperSize{}; From 83c230e45f435842d2622accd8a072b7e22513c5 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 10 Jul 2021 15:51:51 +0300 Subject: [PATCH 21/32] Update tests. --- .../share/seamtest1_by_angle/output.json | 36 ++++++------- .../share/seamtest1_by_angle_2/output.json | 50 +++++++++---------- .../output.json | 40 +++++++-------- .../output.json | 40 +++++++-------- .../seamtest1_by_intersection/output.json | 36 ++++++------- .../output.json | 37 ++++++-------- .../output.json | 41 ++++++++------- 7 files changed, 140 insertions(+), 140 deletions(-) diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json index 55a851c7c..8aa772728 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -67,13 +67,13 @@ }, { "type": "QPointF", - "x": 285.16939607807865, - "y": -68.91025714339723 + "x": 285.54316176628, + "y": -69.17631403269839 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -82,13 +82,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -252,18 +252,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json index 38483c8a9..3747f8864 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_angle_2/output.json @@ -2,13 +2,18 @@ "vector": [ { "type": "QPointF", - "x": 1117.7037149530322, - "y": 212.15307563552173 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1102.2898194097418, - "y": 245.01541704287078 + "x": 1117.8412466375905, + "y": 211.8698223696717 + }, + { + "type": "QPointF", + "x": 1101.8482040478996, + "y": 244.8082798528157 }, { "type": "QPointF", @@ -102,8 +107,8 @@ }, { "type": "QPointF", - "x": 1020.6660121283516, - "y": 644.7426504865729 + "x": 1020.5214918560622, + "y": 644.8368304816686 }, { "type": "QPointF", @@ -167,23 +172,23 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -242,13 +247,13 @@ }, { "type": "QPointF", - "x": 285.16939607807876, - "y": -68.9102571433973 + "x": 285.5431617662801, + "y": -69.17631403269846 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837736 + "x": 557.0289896899872, + "y": -31.71862328205886 }, { "type": "QPointF", @@ -257,13 +262,8 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.217486096297492 - }, - { - "type": "QPointF", - "x": 1117.7037149530322, - "y": 212.15307563552173 + "x": 586.285424563237, + "y": -21.503347379130616 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json index b2706a7b4..ca45ada65 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_edge_symmetry/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -77,18 +77,18 @@ }, { "type": "QPointF", - "x": 330.2597593313006, - "y": -109.8693765699337 + "x": 330.5479727319059, + "y": -110.14723735764198 }, { "type": "QPointF", - "x": 335.08623255837216, - "y": -62.0230857634808 + "x": 335.3744459589775, + "y": -62.300946551189064 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -97,13 +97,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -267,18 +267,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json index 4d6b6e335..a3f1826e3 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_first_right_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -77,18 +77,18 @@ }, { "type": "QPointF", - "x": 308.85408734019427, - "y": -89.2325953918828 + "x": 309.14230074079956, + "y": -89.51045617959079 }, { "type": "QPointF", - "x": 335.0862325583717, - "y": -62.023085763480815 + "x": 335.3744459589773, + "y": -62.30094655118904 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -97,13 +97,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -267,18 +267,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json index 0fca67a6b..302c19b9a 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_intersection/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -72,13 +72,13 @@ }, { "type": "QPointF", - "x": 335.08623255837205, - "y": -62.023085763480815 + "x": 335.37444595897745, + "y": -62.300946551189064 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -87,13 +87,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -257,18 +257,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json index 462176cf6..364d6177b 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_edge_symmetry/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -72,13 +72,8 @@ }, { "type": "QPointF", - "x": 286.5647821037859, - "y": -68.71773166746928 - }, - { - "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -87,13 +82,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -257,18 +252,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } diff --git a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json index 9dc924f52..1f6276175 100644 --- a/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json +++ b/src/test/ValentinaTest/share/seamtest1_by_second_right_angle/output.json @@ -2,13 +2,13 @@ "vector": [ { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 }, { "type": "QPointF", - "x": 29.433070866141733, - "y": 2.2085234576982202 + "x": 29.118425196850392, + "y": 2.21193428424408 }, { "type": "QPointF", @@ -67,13 +67,18 @@ }, { "type": "QPointF", - "x": 284.4959443876258, - "y": -68.43087536087263 + "x": 284.4072000868026, + "y": -68.45268234011405 }, { "type": "QPointF", - "x": 556.9804629248772, - "y": -31.407692230837753 + "x": 284.6164363645234, + "y": -69.30417703672788 + }, + { + "type": "QPointF", + "x": 557.0289896899872, + "y": -31.71862328205888 }, { "type": "QPointF", @@ -82,13 +87,13 @@ }, { "type": "QPointF", - "x": 586.153833178555, - "y": -21.2174860962975 + "x": 586.285424563237, + "y": -21.503347379130616 }, { "type": "QPointF", - "x": 1117.7037149530324, - "y": 212.15307563552184 + "x": 1117.8412466375905, + "y": 211.86982236967177 }, { "type": "QPointF", @@ -252,18 +257,18 @@ }, { "type": "QPointF", - "x": 1290.4028062852726, - "y": 707.5008815309488 + "x": 1290.475911190263, + "y": 707.5015785231967 }, { "type": "QPointF", - "x": 1302.4618765682826, - "y": 882.3181924346007 + "x": 1302.486882635022, + "y": 882.6858530210393 }, { "type": "QPointF", - "x": 29.433070866141634, - "y": 970.4328156646322 + "x": 29.11842519685024, + "y": 970.4543384295728 } ] } From bd229583d4ed5f39d16186909f72de6bb790b925 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 10 Jul 2021 16:13:29 +0300 Subject: [PATCH 22/32] Test IsAllowanceValid method. --- src/libs/vlayout/vabstractpiece.cpp | 4 +- src/test/ValentinaTest/share/test_data.qrc | 2 + .../valid_allowance_case3/allowance.json | 389 +++++++++++++++++ .../share/valid_allowance_case3/base.json | 399 ++++++++++++++++++ src/test/ValentinaTest/tst_vabstractpiece.cpp | 36 ++ src/test/ValentinaTest/tst_vabstractpiece.h | 2 + 6 files changed, 830 insertions(+), 2 deletions(-) create mode 100644 src/test/ValentinaTest/share/valid_allowance_case3/allowance.json create mode 100644 src/test/ValentinaTest/share/valid_allowance_case3/base.json diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index f814e65b6..365ab3c86 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -1532,8 +1532,8 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto return false; // Not enough data } -// DumpVector(base); // Uncomment for dumping test data -// DumpVector(allowance); // Uncomment for dumping test data + DumpVector(base, QStringLiteral("base.json.XXXXXX")); // Uncomment for dumping test data + DumpVector(allowance, QStringLiteral("allowance.json.XXXXXX")); // Uncomment for dumping test data // First check direction const qreal baseDirection = VPiece::SumTrapezoids(base); diff --git a/src/test/ValentinaTest/share/test_data.qrc b/src/test/ValentinaTest/share/test_data.qrc index 738852acf..87be7733a 100644 --- a/src/test/ValentinaTest/share/test_data.qrc +++ b/src/test/ValentinaTest/share/test_data.qrc @@ -145,5 +145,7 @@ smart_pattern_#120_piece_2/output.json smart_pattern_#133/input.json smart_pattern_#133/output.json + valid_allowance_case3/allowance.json + valid_allowance_case3/base.json diff --git a/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json b/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json new file mode 100644 index 000000000..eac899766 --- /dev/null +++ b/src/test/ValentinaTest/share/valid_allowance_case3/allowance.json @@ -0,0 +1,389 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 92.52561994759033, + "y": 2202.2061793579987 + }, + { + "type": "QPointF", + "x": 92.2772790878172, + "y": 1326.7170103448875 + }, + { + "type": "QPointF", + "x": 91.97507683533829, + "y": 261.34742461356785 + }, + { + "type": "QPointF", + "x": 106.8818073273175, + "y": 259.98160041743677 + }, + { + "type": "QPointF", + "x": 137.38232324564848, + "y": 255.0603139564763 + }, + { + "type": "QPointF", + "x": 158.17729436344507, + "y": 249.89617336979745 + }, + { + "type": "QPointF", + "x": 171.13588768568093, + "y": 245.8762939360861 + }, + { + "type": "QPointF", + "x": 183.5441878371626, + "y": 241.3114353974675 + }, + { + "type": "QPointF", + "x": 195.32179015503095, + "y": 236.24278356546813 + }, + { + "type": "QPointF", + "x": 206.49141930179945, + "y": 230.67800026587307 + }, + { + "type": "QPointF", + "x": 217.07741190258892, + "y": 224.62200069789338 + }, + { + "type": "QPointF", + "x": 227.10500822940557, + "y": 218.07654031559593 + }, + { + "type": "QPointF", + "x": 236.5994666818242, + "y": 211.04004206628608 + }, + { + "type": "QPointF", + "x": 245.58509742928743, + "y": 203.50772328639982 + }, + { + "type": "QPointF", + "x": 254.08433856460397, + "y": 195.47203389468186 + }, + { + "type": "QPointF", + "x": 262.1169987762586, + "y": 186.92336133325725 + }, + { + "type": "QPointF", + "x": 269.6209156939228, + "y": 177.94524558586846 + }, + { + "type": "QPointF", + "x": 280.24821231578767, + "y": 163.37755107526294 + }, + { + "type": "QPointF", + "x": 292.9139140638711, + "y": 141.85503520098874 + }, + { + "type": "QPointF", + "x": 303.86632681987686, + "y": 118.18371124945193 + }, + { + "type": "QPointF", + "x": 313.1867421043998, + "y": 92.23186854093896 + }, + { + "type": "QPointF", + "x": 320.93528277934104, + "y": 63.826799135622935 + }, + { + "type": "QPointF", + "x": 327.9396074726531, + "y": 33.63270638137283 + }, + { + "type": "QPointF", + "x": 331.47901542748485, + "y": 1.0285850987598408 + }, + { + "type": "QPointF", + "x": 334.4654936711189, + "y": -34.069089116676814 + }, + { + "type": "QPointF", + "x": 337.06492259413517, + "y": -89.88560581238215 + }, + { + "type": "QPointF", + "x": 755.0589593624836, + "y": 81.19608223354786 + }, + { + "type": "QPointF", + "x": 736.609138766886, + "y": 127.80263877573647 + }, + { + "type": "QPointF", + "x": 719.3604904848505, + "y": 178.08816959390435 + }, + { + "type": "QPointF", + "x": 703.0134745532514, + "y": 233.0508326580554 + }, + { + "type": "QPointF", + "x": 688.0700705174979, + "y": 290.15129975668845 + }, + { + "type": "QPointF", + "x": 675.0440800520552, + "y": 346.75662531853175 + }, + { + "type": "QPointF", + "x": 664.4353812232487, + "y": 400.2315392200221 + }, + { + "type": "QPointF", + "x": 656.7282750527801, + "y": 447.93899690683065 + }, + { + "type": "QPointF", + "x": 653.2594531347684, + "y": 477.88418396195357 + }, + { + "type": "QPointF", + "x": 652.0414453212609, + "y": 494.3897671909149 + }, + { + "type": "QPointF", + "x": 651.8060316356091, + "y": 510.4752049493997 + }, + { + "type": "QPointF", + "x": 653.3086426448241, + "y": 530.2043953624742 + }, + { + "type": "QPointF", + "x": 655.3752026443186, + "y": 545.8101384800652 + }, + { + "type": "QPointF", + "x": 658.5584573074667, + "y": 563.1680268477246 + }, + { + "type": "QPointF", + "x": 663.0015557834969, + "y": 581.6964468162018 + }, + { + "type": "QPointF", + "x": 668.852212781207, + "y": 600.9318511423511 + }, + { + "type": "QPointF", + "x": 676.2470115628831, + "y": 620.4200106226999 + }, + { + "type": "QPointF", + "x": 685.3103826896315, + "y": 639.7191723213771 + }, + { + "type": "QPointF", + "x": 696.1560114325907, + "y": 658.4074374442621 + }, + { + "type": "QPointF", + "x": 708.968803887299, + "y": 676.1977914955778 + }, + { + "type": "QPointF", + "x": 719.9264769666623, + "y": 688.5704353540432 + }, + { + "type": "QPointF", + "x": 727.7391818856612, + "y": 696.2478567357342 + }, + { + "type": "QPointF", + "x": 736.1962039308098, + "y": 703.5812938875612 + }, + { + "type": "QPointF", + "x": 745.2329152897552, + "y": 710.4460821458293 + }, + { + "type": "QPointF", + "x": 754.8814128293536, + "y": 716.8080984445425 + }, + { + "type": "QPointF", + "x": 765.1788854726277, + "y": 722.6321788768454 + }, + { + "type": "QPointF", + "x": 776.1671520789575, + "y": 727.8805981700134 + }, + { + "type": "QPointF", + "x": 787.891619425379, + "y": 732.5117038125346 + }, + { + "type": "QPointF", + "x": 800.3997769749498, + "y": 736.4789447545836 + }, + { + "type": "QPointF", + "x": 813.8809155042308, + "y": 739.76494255191 + }, + { + "type": "QPointF", + "x": 845.5484535894442, + "y": 745.6456405592226 + }, + { + "type": "QPointF", + "x": 841.4143655756919, + "y": 778.8837473816585 + }, + { + "type": "QPointF", + "x": 839.2350865290254, + "y": 805.1996178416854 + }, + { + "type": "QPointF", + "x": 835.9161011895001, + "y": 862.3048099622779 + }, + { + "type": "QPointF", + "x": 831.693873004494, + "y": 965.4116356694894 + }, + { + "type": "QPointF", + "x": 827.8540427601858, + "y": 1087.310954354911 + }, + { + "type": "QPointF", + "x": 823.114585595346, + "y": 1281.5741119146162 + }, + { + "type": "QPointF", + "x": 820.4843664787782, + "y": 1451.2417377419042 + }, + { + "type": "QPointF", + "x": 820.0163358596512, + "y": 1533.4268890124665 + }, + { + "type": "QPointF", + "x": 821.0509143011902, + "y": 1572.2505146663095 + }, + { + "type": "QPointF", + "x": 827.8638234577412, + "y": 1651.1597197912597 + }, + { + "type": "QPointF", + "x": 869.8910601743813, + "y": 2101.4232016478572 + }, + { + "type": "QPointF", + "x": 875.1648042331244, + "y": 2176.834879067045 + }, + { + "type": "QPointF", + "x": 813.9396120076474, + "y": 2181.83573701641 + }, + { + "type": "QPointF", + "x": 735.5341251972459, + "y": 2186.9448739581426 + }, + { + "type": "QPointF", + "x": 648.8793539199287, + "y": 2191.3042719247806 + }, + { + "type": "QPointF", + "x": 555.471196133076, + "y": 2194.926499889949 + }, + { + "type": "QPointF", + "x": 456.8424236034925, + "y": 2197.8182809981568 + }, + { + "type": "QPointF", + "x": 354.4554366585654, + "y": 2199.9847968442527 + }, + { + "type": "QPointF", + "x": 197.51793975963105, + "y": 2201.9649058358928 + }, + { + "type": "QPointF", + "x": 92.52561994759033, + "y": 2202.2061793579987 + } + ] +} diff --git a/src/test/ValentinaTest/share/valid_allowance_case3/base.json b/src/test/ValentinaTest/share/valid_allowance_case3/base.json new file mode 100644 index 000000000..7cb19ff06 --- /dev/null +++ b/src/test/ValentinaTest/share/valid_allowance_case3/base.json @@ -0,0 +1,399 @@ +{ + "vector": [ + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 2126.6135433070867 + }, + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 1559.684409448819 + }, + { + "type": "QPointF", + "x": 92.19617843603547, + "y": 705.8838909701382 + }, + { + "type": "QPointF", + "x": 92.57171849783603, + "y": 334.4903817714229 + }, + { + "type": "QPointF", + "x": 92.8636004614689, + "y": 287.83352776342883 + }, + { + "type": "QPointF", + "x": 110.19985000692739, + "y": 286.24509969651666 + }, + { + "type": "QPointF", + "x": 142.68693934522423, + "y": 281.0032777763672 + }, + { + "type": "QPointF", + "x": 165.290696688526, + "y": 275.3899503979951 + }, + { + "type": "QPointF", + "x": 179.62815627390916, + "y": 270.942333478028 + }, + { + "type": "QPointF", + "x": 193.34787262661484, + "y": 265.89502130992287 + }, + { + "type": "QPointF", + "x": 206.4586549775985, + "y": 260.25261726292615 + }, + { + "type": "QPointF", + "x": 218.96931255781567, + "y": 254.01972470628417 + }, + { + "type": "QPointF", + "x": 230.8886545982218, + "y": 247.2009470092434 + }, + { + "type": "QPointF", + "x": 242.22549032977236, + "y": 239.80088754105026 + }, + { + "type": "QPointF", + "x": 252.98862898342287, + "y": 231.82414967095104 + }, + { + "type": "QPointF", + "x": 263.1868797901287, + "y": 223.27533676819218 + }, + { + "type": "QPointF", + "x": 272.8290519808455, + "y": 214.15905220202012 + }, + { + "type": "QPointF", + "x": 281.9239547865287, + "y": 204.47989934168118 + }, + { + "type": "QPointF", + "x": 290.48039743813376, + "y": 194.2424815564218 + }, + { + "type": "QPointF", + "x": 302.389273453946, + "y": 177.91802257725897 + }, + { + "type": "QPointF", + "x": 316.3771086041528, + "y": 154.1488378881743 + }, + { + "type": "QPointF", + "x": 328.36966929524556, + "y": 128.22945414584296 + }, + { + "type": "QPointF", + "x": 338.43742937486826, + "y": 100.19669830423614 + }, + { + "type": "QPointF", + "x": 346.6508626906646, + "y": 70.08739731732494 + }, + { + "type": "QPointF", + "x": 353.08044309027844, + "y": 37.9383781390806 + }, + { + "type": "QPointF", + "x": 357.7966444213536, + "y": 3.7864677234742468 + }, + { + "type": "QPointF", + "x": 360.86994053153404, + "y": -32.331506975522956 + }, + { + "type": "QPointF", + "x": 361.74847243745114, + "y": -51.19587766869522 + }, + { + "type": "QPointF", + "x": 720.8335098627776, + "y": 95.77481796543057 + }, + { + "type": "QPointF", + "x": 711.7833466919931, + "y": 118.6366631172392 + }, + { + "type": "QPointF", + "x": 694.1575967053057, + "y": 170.02157048253167 + }, + { + "type": "QPointF", + "x": 677.5296945004579, + "y": 225.92864185095686 + }, + { + "type": "QPointF", + "x": 662.3755913618734, + "y": 283.8342144770952 + }, + { + "type": "QPointF", + "x": 649.1712385739754, + "y": 341.2146256155272 + }, + { + "type": "QPointF", + "x": 638.3925874211877, + "y": 395.5462125208335 + }, + { + "type": "QPointF", + "x": 630.5155891879336, + "y": 444.30531244759425 + }, + { + "type": "QPointF", + "x": 626.9150699255756, + "y": 475.3873989182334 + }, + { + "type": "QPointF", + "x": 625.5990148277461, + "y": 493.2216498238739 + }, + { + "type": "QPointF", + "x": 625.3346118384657, + "y": 511.2878799814551 + }, + { + "type": "QPointF", + "x": 626.9842617015943, + "y": 532.9476815302078 + }, + { + "type": "QPointF", + "x": 629.2338286370648, + "y": 549.9354117337174 + }, + { + "type": "QPointF", + "x": 632.6645776213952, + "y": 568.642855588862 + }, + { + "type": "QPointF", + "x": 637.4591049454809, + "y": 588.636789167028 + }, + { + "type": "QPointF", + "x": 643.8000069002165, + "y": 609.4839885396026 + }, + { + "type": "QPointF", + "x": 651.8698797764976, + "y": 630.7512297779718 + }, + { + "type": "QPointF", + "x": 661.8513198652188, + "y": 652.0052889535226 + }, + { + "type": "QPointF", + "x": 673.9269234572748, + "y": 672.8129421376415 + }, + { + "type": "QPointF", + "x": 688.2792868435611, + "y": 692.740965401715 + }, + { + "type": "QPointF", + "x": 700.728660557709, + "y": 706.7979340765864 + }, + { + "type": "QPointF", + "x": 709.7835961192387, + "y": 715.6960758355142 + }, + { + "type": "QPointF", + "x": 719.5104320429546, + "y": 724.1306216545854 + }, + { + "type": "QPointF", + "x": 729.9319928652181, + "y": 732.0474185427238 + }, + { + "type": "QPointF", + "x": 741.0711031223916, + "y": 739.3923135088523 + }, + { + "type": "QPointF", + "x": 752.9505873508364, + "y": 746.1111535618945 + }, + { + "type": "QPointF", + "x": 765.5932700869149, + "y": 752.1497857107736 + }, + { + "type": "QPointF", + "x": 779.0219758669887, + "y": 757.4540569644129 + }, + { + "type": "QPointF", + "x": 793.2595292274196, + "y": 761.9698143317357 + }, + { + "type": "QPointF", + "x": 808.3287547045696, + "y": 765.6429048216658 + }, + { + "type": "QPointF", + "x": 816.2184566929134, + "y": 767.1080314960631 + }, + { + "type": "QPointF", + "x": 815.0928241314082, + "y": 776.158127961756 + }, + { + "type": "QPointF", + "x": 812.8418244603739, + "y": 803.3400603715177 + }, + { + "type": "QPointF", + "x": 809.5039807203343, + "y": 860.7697229173427 + }, + { + "type": "QPointF", + "x": 805.2593754665681, + "y": 964.3281506300941 + }, + { + "type": "QPointF", + "x": 801.410474020859, + "y": 1086.4777243496678 + }, + { + "type": "QPointF", + "x": 796.6657651401786, + "y": 1280.9287465579719 + }, + { + "type": "QPointF", + "x": 794.0308545255843, + "y": 1450.8314875066817 + }, + { + "type": "QPointF", + "x": 793.5576303056135, + "y": 1533.703811210904 + }, + { + "type": "QPointF", + "x": 793.8519374393269, + "y": 1559.684409448819 + }, + { + "type": "QPointF", + "x": 794.6245773796793, + "y": 1573.7421032657548 + }, + { + "type": "QPointF", + "x": 801.5051913909572, + "y": 1653.4354868006676 + }, + { + "type": "QPointF", + "x": 843.5206921852375, + "y": 2103.581567208798 + }, + { + "type": "QPointF", + "x": 809.0163237412717, + "y": 2106.4056855746167 + }, + { + "type": "QPointF", + "x": 731.7317748936437, + "y": 2111.450016119814 + }, + { + "type": "QPointF", + "x": 645.9475353931566, + "y": 2115.770598189225 + }, + { + "type": "QPointF", + "x": 553.2539204606728, + "y": 2119.36847505834 + }, + { + "type": "QPointF", + "x": 455.24124531705513, + "y": 2122.2446900026507 + }, + { + "type": "QPointF", + "x": 353.499825183166, + "y": 2124.4002862976467 + }, + { + "type": "QPointF", + "x": 197.34423228847493, + "y": 2126.374554245388 + }, + { + "type": "QPointF", + "x": 93.34601574803145, + "y": 2126.6135433070867 + } + ] +} diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp index 022699162..9c08d4ba8 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.cpp +++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp @@ -1266,6 +1266,42 @@ void TST_VAbstractPiece::PossibleInfiniteClearLoops() const Comparison(res, expect); } +//--------------------------------------------------------------------------------------------------------------------- +void TST_VAbstractPiece::IsAllowanceValid_data() const +{ + QTest::addColumn>("base"); + QTest::addColumn>("allowance"); + QTest::addColumn("valid"); + + auto ASSERT_TEST_CASE = [this](const char *title, const QString &base, const QString &allowance, bool valid) + { + QVector basePoints; + AbstractTest::VectorFromJson(base, basePoints); + + QVector allowancePoints; + AbstractTest::VectorFromJson(allowance, allowancePoints); + + QTest::newRow(title) << basePoints << allowancePoints << valid ; + }; + + // See file src/app/share/collection/valid_allowance/case3.val (private collection) + ASSERT_TEST_CASE("Valid seam allowance. Case 3", + QStringLiteral("://valid_allowance_case3/base.json"), + QStringLiteral("://valid_allowance_case3/allowance.json"), + true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void TST_VAbstractPiece::IsAllowanceValid() const +{ + QFETCH(QVector, base); + QFETCH(QVector, allowance); + QFETCH(bool, valid); + + bool result = VAbstractPiece::IsAllowanceValid(base, allowance); + QVERIFY(result == valid); +} + //--------------------------------------------------------------------------------------------------------------------- void TST_VAbstractPiece::Case3() const { diff --git a/src/test/ValentinaTest/tst_vabstractpiece.h b/src/test/ValentinaTest/tst_vabstractpiece.h index 0fceca326..fff210e94 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.h +++ b/src/test/ValentinaTest/tst_vabstractpiece.h @@ -61,6 +61,8 @@ private slots: void TestCorrectEquidistantPoints() const; void PossibleInfiniteClearLoops_data() const; void PossibleInfiniteClearLoops() const; + void IsAllowanceValid_data() const; + void IsAllowanceValid() const; private: QVector InputPointsCase3() const; From af3ce8abfe75a16b04404ee55be996ed1241724b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 10 Jul 2021 16:21:44 +0300 Subject: [PATCH 23/32] Fix build. --- src/libs/vlayout/vabstractpiece.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 365ab3c86..5434c9100 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -1532,8 +1532,8 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto return false; // Not enough data } - DumpVector(base, QStringLiteral("base.json.XXXXXX")); // Uncomment for dumping test data - DumpVector(allowance, QStringLiteral("allowance.json.XXXXXX")); // Uncomment for dumping test data +// DumpVector(base, QStringLiteral("base.json.XXXXXX")); // Uncomment for dumping test data +// DumpVector(allowance, QStringLiteral("allowance.json.XXXXXX")); // Uncomment for dumping test data // First check direction const qreal baseDirection = VPiece::SumTrapezoids(base); From 5d84aa6dc1d80e47e14f98d2aa9efa64ac3a2d91 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 20 Jul 2021 16:14:13 +0300 Subject: [PATCH 24/32] Fix regression. Set default value for detail labels size and grainline length to 10 cm. --- ChangeLog.txt | 1 + .../tools/piece/dialogseamallowance.cpp | 27 ++++++++++--------- .../dialogs/tools/piece/dialogseamallowance.h | 2 ++ 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a29344b0b..931855957 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,7 @@ - Fix regression. Minimal seam allowance width is less than the point accuracy values. - Call autosave only in GUI mode. - Warn about stale layout only in GUI mode. +- Fix regression. Set default value for detail labels size and grainline length to 10 cm. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 5210958ae..034ca9071 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -131,9 +131,9 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, quint32 toolId, m_tabPlaceLabels(new QWidget), m_ftb(new FancyTabBar(FancyTabBar::Left, this)), applyAllowed(false),// By default disabled - flagGPin(true), - flagDPin(true), - flagPPin(true), + flagGPin(false), + flagDPin(false), + flagPPin(false), flagGFormulas(true), flagDLAngle(true), flagDLFormulas(true), @@ -170,6 +170,8 @@ DialogSeamAllowance::DialogSeamAllowance(const VContainer *data, quint32 toolId, { ui->setupUi(this); + m_defLabelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); + InitOkCancelApply(ui); InitFancyTabBar(); EnableApply(applyAllowed); @@ -2558,8 +2560,8 @@ VPiece DialogSeamAllowance::CreatePiece() const } else { - piece.GetPatternPieceData().SetLabelWidth(QString::number(1)); - piece.GetPatternPieceData().SetLabelHeight(QString::number(1)); + piece.GetPatternPieceData().SetLabelWidth(m_defLabelValue); + piece.GetPatternPieceData().SetLabelHeight(m_defLabelValue); piece.GetPatternPieceData().SetCenterPin(NULL_ID); piece.GetPatternPieceData().SetTopLeftPin(getCurrentObjectId(uiTabLabels->comboBoxDLTopLeftPin)); piece.GetPatternPieceData().SetBottomRightPin(getCurrentObjectId(uiTabLabels->comboBoxDLBottomRightPin)); @@ -2581,8 +2583,8 @@ VPiece DialogSeamAllowance::CreatePiece() const piece.GetPatternInfo().SetCenterPin(NULL_ID); piece.GetPatternInfo().SetTopLeftPin(getCurrentObjectId(uiTabLabels->comboBoxPLTopLeftPin)); piece.GetPatternInfo().SetBottomRightPin(getCurrentObjectId(uiTabLabels->comboBoxPLBottomRightPin)); - piece.GetPatternInfo().SetLabelWidth(QString::number(1)); - piece.GetPatternInfo().SetLabelHeight(QString::number(1)); + piece.GetPatternInfo().SetLabelWidth(m_defLabelValue); + piece.GetPatternInfo().SetLabelHeight(m_defLabelValue); } piece.GetGrainlineGeometry().SetVisible(uiTabGrainline->groupBoxGrainline->isChecked()); @@ -2600,7 +2602,7 @@ VPiece DialogSeamAllowance::CreatePiece() const else { piece.GetGrainlineGeometry().SetRotation(QString::number(90)); - piece.GetGrainlineGeometry().SetLength(QChar('1')); + piece.GetGrainlineGeometry().SetLength(m_defLabelValue); piece.GetGrainlineGeometry().SetCenterPin(NULL_ID); piece.GetGrainlineGeometry().SetTopPin(getCurrentObjectId(uiTabGrainline->comboBoxGrainlineTopPin)); piece.GetGrainlineGeometry().SetBottomPin(getCurrentObjectId(uiTabGrainline->comboBoxGrainlineBottomPin)); @@ -3142,11 +3144,10 @@ void DialogSeamAllowance::InitPatternPieceDataTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitLabelsTab() { - QString labelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); - uiTabLabels->lineEditDLWidthFormula->setPlainText(labelValue); - uiTabLabels->lineEditDLHeightFormula->setPlainText(labelValue); - uiTabLabels->lineEditPLWidthFormula->setPlainText(labelValue); - uiTabLabels->lineEditPLHeightFormula->setPlainText(labelValue); + uiTabLabels->lineEditDLWidthFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditDLHeightFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditPLWidthFormula->setPlainText(m_defLabelValue); + uiTabLabels->lineEditPLHeightFormula->setPlainText(m_defLabelValue); m_DLWidthBaseHeight = uiTabLabels->lineEditDLWidthFormula->height(); m_DLHeightBaseHeight = uiTabLabels->lineEditDLHeightFormula->height(); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h index 0a3f05e0e..f819cc285 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h @@ -238,6 +238,8 @@ private: VAbstractPattern *m_doc{nullptr}; + QString m_defLabelValue{}; + VPiece CreatePiece() const; void NewMainPathItem(const VPieceNode &node); From 95ba17aee35f8660066bb07ca07393c0ca929901 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 10:49:29 +0300 Subject: [PATCH 25/32] 2 decimals for entering values in multi measurements tables. Closes #136 --- ChangeLog.txt | 1 + src/app/tape/tmainwindow.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 931855957..e86e2647b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,7 @@ - Call autosave only in GUI mode. - Warn about stale layout only in GUI mode. - Fix regression. Set default value for detail labels size and grainline length to 10 cm. +- [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index bd01e631e..78d89bab1 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -4265,35 +4265,35 @@ void TMainWindow::SetDecimals() switch (mUnit) { case Unit::Cm: - ui->doubleSpinBoxBaseValue->setDecimals(1); + ui->doubleSpinBoxBaseValue->setDecimals(2); ui->doubleSpinBoxBaseValue->setSingleStep(0.1); - ui->doubleSpinBoxCorrection->setDecimals(1); + ui->doubleSpinBoxCorrection->setDecimals(2); ui->doubleSpinBoxCorrection->setSingleStep(0.1); - ui->doubleSpinBoxShiftA->setDecimals(1); + ui->doubleSpinBoxShiftA->setDecimals(2); ui->doubleSpinBoxShiftA->setSingleStep(0.1); - ui->doubleSpinBoxShiftB->setDecimals(1); + ui->doubleSpinBoxShiftB->setDecimals(2); ui->doubleSpinBoxShiftB->setSingleStep(0.1); - ui->doubleSpinBoxShiftC->setDecimals(1); + ui->doubleSpinBoxShiftC->setDecimals(2); ui->doubleSpinBoxShiftC->setSingleStep(0.1); break; case Unit::Mm: - ui->doubleSpinBoxBaseValue->setDecimals(0); + ui->doubleSpinBoxBaseValue->setDecimals(1); ui->doubleSpinBoxBaseValue->setSingleStep(1); - ui->doubleSpinBoxCorrection->setDecimals(0); + ui->doubleSpinBoxCorrection->setDecimals(1); ui->doubleSpinBoxCorrection->setSingleStep(1); - ui->doubleSpinBoxShiftA->setDecimals(0); + ui->doubleSpinBoxShiftA->setDecimals(1); ui->doubleSpinBoxShiftA->setSingleStep(1); - ui->doubleSpinBoxShiftB->setDecimals(0); + ui->doubleSpinBoxShiftB->setDecimals(1); ui->doubleSpinBoxShiftB->setSingleStep(1); - ui->doubleSpinBoxShiftC->setDecimals(0); + ui->doubleSpinBoxShiftC->setDecimals(1); ui->doubleSpinBoxShiftC->setSingleStep(1); break; case Unit::Inch: From a6d91940516f0959ccfb92a3fdbfd7f73cc7871a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 11:15:48 +0300 Subject: [PATCH 26/32] New warnings. Warn a user about incorrect cut curve segment length. --- ChangeLog.txt | 1 + src/libs/vgeometry/vabstractcubicbezier.cpp | 16 ++++++ .../vgeometry/vabstractcubicbezierpath.cpp | 17 +++++++ src/libs/vgeometry/varc.cpp | 51 ++++++++++++++++++- src/libs/vgeometry/vellipticalarc.cpp | 17 +++++++ 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index e86e2647b..7c75803c1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,6 +4,7 @@ - Warn about stale layout only in GUI mode. - Fix regression. Set default value for detail labels size and grainline length to 10 cm. - [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables. +- New warnings. Warn a user about incorrect cut curve segment length. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vgeometry/vabstractcubicbezier.cpp b/src/libs/vgeometry/vabstractcubicbezier.cpp index 396826f85..f6769426e 100644 --- a/src/libs/vgeometry/vabstractcubicbezier.cpp +++ b/src/libs/vgeometry/vabstractcubicbezier.cpp @@ -39,6 +39,7 @@ #include "../vmisc/vmath.h" #include "../vgeometry/vpointf.h" #include "../vmisc/vabstractapplication.h" +#include "../ifc/exception/vexception.h" namespace { @@ -420,6 +421,11 @@ QPointF VAbstractCubicBezier::CutSpline(qreal length, QPointF &spl1p2, QPointF & if (fullLength <= minLength) { spl1p2 = spl1p3 = spl2p2 = spl2p3 = QPointF(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -428,10 +434,20 @@ QPointF VAbstractCubicBezier::CutSpline(qreal length, QPointF &spl1p2, QPointF & if (length < minLength) { length = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { length = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } const qreal parT = GetParmT(length); diff --git a/src/libs/vgeometry/vabstractcubicbezierpath.cpp b/src/libs/vgeometry/vabstractcubicbezierpath.cpp index 3a9144e6d..99de0e36b 100644 --- a/src/libs/vgeometry/vabstractcubicbezierpath.cpp +++ b/src/libs/vgeometry/vabstractcubicbezierpath.cpp @@ -30,12 +30,14 @@ #include "vsplinepoint.h" #include +#include #include "../vmisc/def.h" #include "../ifc/ifcdef.h" #include "../ifc/exception/vexception.h" #include "vpointf.h" #include "vspline.h" +#include "vabstractapplication.h" //--------------------------------------------------------------------------------------------------------------------- VAbstractCubicBezierPath::VAbstractCubicBezierPath(const GOType &type, const quint32 &idObject, const Draw &mode) @@ -180,6 +182,11 @@ QPointF VAbstractCubicBezierPath::CutSplinePath(qreal length, qint32 &p1, qint32 { p1 = p2 = -1; spl1p2 = spl1p3 = spl2p2 = spl2p3 = QPointF(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -188,10 +195,20 @@ QPointF VAbstractCubicBezierPath::CutSplinePath(qreal length, qint32 &p1, qint32 if (length < minLength) { length = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { length = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } fullLength = 0; diff --git a/src/libs/vgeometry/varc.cpp b/src/libs/vgeometry/varc.cpp index 9ec997da1..ffff21381 100644 --- a/src/libs/vgeometry/varc.cpp +++ b/src/libs/vgeometry/varc.cpp @@ -30,6 +30,7 @@ #include #include +#include #include "../vmisc/def.h" #include "../vmisc/vmath.h" @@ -38,6 +39,7 @@ #include "vabstractcurve.h" #include "varc_p.h" #include "vspline.h" +#include "../ifc/exception/vexception.h" //--------------------------------------------------------------------------------------------------------------------- /** @@ -351,10 +353,17 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { arc1 = VArc(); arc2 = VArc(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } QLineF line(static_cast(GetCenter()), GetP1()); + const qreal minLength = ToPixel(1, Unit::Mm); + const qreal maxLength = fullLength - ToPixel(1, Unit::Mm); if (not IsFlipped()) { @@ -362,7 +371,26 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { length = fullLength + length; } - length = qBound(ToPixel(1, Unit::Mm), length, fullLength - ToPixel(1, Unit::Mm)); + + const qreal minLength = ToPixel(1, Unit::Mm); + const qreal maxLength = fullLength - ToPixel(1, Unit::Mm); + + if (length < minLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to " + "minimal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + else if (length > maxLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to " + "maximal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + + length = qBound(minLength, length, maxLength); line.setAngle(line.angle() + qRadiansToDegrees(length/d->radius)); } @@ -372,7 +400,26 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const { length = fullLength + length; } - length = qBound(fullLength + ToPixel(1, Unit::Mm), length, ToPixel(-1, Unit::Mm)); + + const qreal minLength = fullLength + ToPixel(1, Unit::Mm); + const qreal maxLength = ToPixel(-1, Unit::Mm); + + if (length > minLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to " + "minimal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + else if (length < maxLength) + { + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to " + "maximal value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + } + + length = qBound(minLength, length, maxLength); line.setAngle(line.angle() - qRadiansToDegrees(qAbs(length)/d->radius)); } diff --git a/src/libs/vgeometry/vellipticalarc.cpp b/src/libs/vgeometry/vellipticalarc.cpp index 42deedbd7..593fefe46 100644 --- a/src/libs/vgeometry/vellipticalarc.cpp +++ b/src/libs/vgeometry/vellipticalarc.cpp @@ -31,10 +31,12 @@ #include #include #include +#include #include "../vmisc/def.h" #include "../vmisc/vmath.h" #include "../ifc/ifcdef.h" +#include "../ifc/exception/vexception.h" #include "../vmisc/vabstractapplication.h" #include "../vmisc/compatibility.h" #include "vabstractcurve.h" @@ -356,6 +358,11 @@ QPointF VEllipticalArc::CutArc(const qreal &length, VEllipticalArc &arc1, VEllip { arc1 = VEllipticalArc(); arc2 = VEllipticalArc(); + + const QString errorMsg = QObject::tr("Unable to cut curve '%1'. The curve is too short.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; + return QPointF(); } @@ -364,10 +371,20 @@ QPointF VEllipticalArc::CutArc(const qreal &length, VEllipticalArc &arc1, VEllip if (length < minLength) { len = minLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too small. Optimize it to minimal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else if (length > maxLength) { len = maxLength; + + const QString errorMsg = QObject::tr("Curve '%1'. Length of a cut segment is too big. Optimize it to maximal " + "value.").arg(name()); + VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::warningMessageSignature + errorMsg; } else { From 8ffc2447dd5d29b8ced72014b568b81b30f4aaef Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 11:27:50 +0300 Subject: [PATCH 27/32] Fix finding point of intersection curve and axis. Add case where the axis's point lies on the curve. --- ChangeLog.txt | 1 + src/libs/vgeometry/vabstractcurve.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 7c75803c1..aed97e0dd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,7 @@ - Fix regression. Set default value for detail labels size and grainline length to 10 cm. - [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables. - New warnings. Warn a user about incorrect cut curve segment length. +- Fix finding point of intersection curve and axis. Case when the axis's point lies on the curve. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vgeometry/vabstractcurve.cpp b/src/libs/vgeometry/vabstractcurve.cpp index 17ae5019e..bf257d271 100644 --- a/src/libs/vgeometry/vabstractcurve.cpp +++ b/src/libs/vgeometry/vabstractcurve.cpp @@ -464,6 +464,12 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const { SCASSERT(intersectionPoint != nullptr) + if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) + { + *intersectionPoint = point; + return true; + } + // Normalize an angle { QLineF line(QPointF(10,10), QPointF(100, 10)); From 25047b329ddc8a6a5ab44d682857508598822a71 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 12:05:04 +0300 Subject: [PATCH 28/32] Fix hover for tool point of intersection line and axis. --- .../toollinepoint/vtoollineintersectaxis.cpp | 7 +++++++ .../toolsinglepoint/toollinepoint/vtoollineintersectaxis.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 5134682fc..5c710eca1 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -359,3 +359,10 @@ QString VToolLineIntersectAxis::MakeToolTip() const .arg(tr("Label"), current->name()); return toolTip; } + +//--------------------------------------------------------------------------------------------------------------------- +void VToolLineIntersectAxis::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + VToolLinePoint::hoverEnterEvent(event); + mainLine->SetBoldLine(false); +} diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h index 4e45eb5d9..c65624513 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h @@ -95,6 +95,7 @@ protected: virtual void ReadToolAttributes(const QDomElement &domElement) override; virtual void SetVisualization() override; virtual QString MakeToolTip() const override; + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; private: Q_DISABLE_COPY(VToolLineIntersectAxis) From a474713b77d502156d19f9a017411e92dd3148d6 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 12:05:55 +0300 Subject: [PATCH 29/32] Fix visualization for tool point of intersection line and axis. Case when the axis's point lies on the line. --- ChangeLog.txt | 1 + .../vtools/visualization/line/vistoollineintersectaxis.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index aed97e0dd..261d98df3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,7 @@ - [smart-pattern/valentina#136] 2 decimals for entering values in multi measurements tables. - New warnings. Warn a user about incorrect cut curve segment length. - 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. # Valentina 0.7.49 July 1, 2021 - Fix crash. diff --git a/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp b/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp index c6c97e483..d79591e62 100644 --- a/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp +++ b/src/libs/vtools/visualization/line/vistoollineintersectaxis.cpp @@ -99,7 +99,10 @@ void VisToolLineIntersectAxis::RefreshGeometry() QPointF p; VToolLineIntersectAxis::FindPoint(axis, base_line, &p); QLineF axis_line(static_cast(*third), p); - DrawLine(this, axis_line, mainColor, lineStyle); + if (not axis_line.isNull()) + { + DrawLine(this, axis_line, mainColor, lineStyle); + } DrawPoint(point, p, mainColor); ShowIntersection(axis_line, base_line); From 8656e9f6335bab31a3833212cc833d32eda98553 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 12:35:22 +0300 Subject: [PATCH 30/32] GCC warning. --- src/libs/vgeometry/varc.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libs/vgeometry/varc.cpp b/src/libs/vgeometry/varc.cpp index ffff21381..2afab412f 100644 --- a/src/libs/vgeometry/varc.cpp +++ b/src/libs/vgeometry/varc.cpp @@ -362,8 +362,6 @@ QPointF VArc::CutArc(qreal length, VArc &arc1, VArc &arc2) const } QLineF line(static_cast(GetCenter()), GetP1()); - const qreal minLength = ToPixel(1, Unit::Mm); - const qreal maxLength = fullLength - ToPixel(1, Unit::Mm); if (not IsFlipped()) { From 6c5c4f671bbf87c045d3700b7cf5ffba0106f43b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 16:26:42 +0300 Subject: [PATCH 31/32] Fix hover for tool point of intersection curve and axis. --- .../toollinepoint/vtoolcurveintersectaxis.cpp | 7 +++++++ .../toollinepoint/vtoolcurveintersectaxis.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index e988feda5..2b5a1a684 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -355,6 +355,13 @@ QString VToolCurveIntersectAxis::MakeToolTip() const return toolTip; } +//--------------------------------------------------------------------------------------------------------------------- +void VToolCurveIntersectAxis::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + VToolLinePoint::hoverEnterEvent(event); + mainLine->SetBoldLine(false); +} + //--------------------------------------------------------------------------------------------------------------------- void VToolCurveIntersectAxis::SetSegments(const QPair &segments) { diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h index 8f0f5a02c..9df6b4988 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h @@ -89,6 +89,7 @@ protected: virtual void ReadToolAttributes(const QDomElement &domElement) override; virtual void SetVisualization() override; virtual auto MakeToolTip() const -> QString override; + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; void SetSegments(const QPair &segments); private: From 816f9f02a3bae8a4902e5497c4daf6dd38cb9ccf Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 24 Jul 2021 16:36:17 +0300 Subject: [PATCH 32/32] When we search point of intersection curve and axis select the base point only at the end. --- src/libs/vgeometry/vabstractcurve.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/libs/vgeometry/vabstractcurve.cpp b/src/libs/vgeometry/vabstractcurve.cpp index bf257d271..2369243de 100644 --- a/src/libs/vgeometry/vabstractcurve.cpp +++ b/src/libs/vgeometry/vabstractcurve.cpp @@ -464,12 +464,6 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const { SCASSERT(intersectionPoint != nullptr) - if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) - { - *intersectionPoint = point; - return true; - } - // Normalize an angle { QLineF line(QPointF(10,10), QPointF(100, 10)); @@ -487,7 +481,7 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const axis = QLineF(point, VGObject::BuildRay(point, angle + 180, rec)); points += VAbstractCurve::CurveIntersectLine(curvePoints, axis); - if (points.size() > 0) + if (not points.isEmpty()) { if (points.size() == 1) { @@ -522,11 +516,26 @@ bool VAbstractCurve::CurveIntersectAxis(const QPointF &point, qreal angle, const *intersectionPoint = points.at(forward.first()); return true; } - else if (not backward.isEmpty()) + + if (not backward.isEmpty()) { *intersectionPoint = points.at(backward.first()); return true; } + + if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) + { + *intersectionPoint = point; + return true; + } + } + else + { + if (VAbstractCurve::IsPointOnCurve(curvePoints, point)) + { + *intersectionPoint = point; + return true; + } } return false;