From 8b4fc336498e3d973dc6879068cb2d68d24427ff Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 12 Dec 2017 10:23:46 +0200 Subject: [PATCH] Fix check layout allowance size position. ref #782. We generate layout allowance right just before creating layout. Because before this we don't know all options. --HG-- branch : develop --- src/app/valentina/mainwindowsnogui.cpp | 8 +------- src/libs/vlayout/vbank.cpp | 5 +++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index d603d9f71..badfe2046 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -742,13 +742,7 @@ QVector MainWindowsNoGUI::PrepareDetailsForLayout(const QHash(VAbstractPattern::getTool(i.key())); SCASSERT(tool != nullptr) - const VLayoutPiece piece = VLayoutPiece::Create(i.value(), tool->getData()); - if (not piece.IsLayoutAllowanceValid()) - { - qWarning()<< tr("Piece '%1' may broke a layout. Please, check seam allowance to check how seam " - "allowance behave.").arg(piece.GetName()); - } - listDetails.append(piece); + listDetails.append(VLayoutPiece::Create(i.value(), tool->getData())); ++i; } } diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 9c3539c31..cd6ff14b8 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -190,6 +190,11 @@ bool VBank::Prepare() { details[i].SetLayoutWidth(layoutWidth); details[i].SetLayoutAllowancePoints(); + if (not details[i].IsLayoutAllowanceValid()) + { + qWarning()<< QObject::tr("Piece '%1' may broke a layout. Please, check seam allowance to check how seam " + "allowance behave.").arg(details[i].GetName()); + } const qreal d = details.at(i).Diagonal(); if (d > diagonal)