From 3c289f6d60b627cd08ffe31aeadacd1e1b397805 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 20 Jul 2019 22:56:48 +0300 Subject: [PATCH] Turn on rotation if successful nesting doesn't improve result. --HG-- branch : develop --- src/app/valentina/mainwindowsnogui.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 769a666ae..4261b0493 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -338,6 +338,24 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) papersCount = lGenerator.PapersCount(); hasResult = true; } + else + { + if (lGenerator.IsRotationNeeded()) + { + lGenerator.SetRotate(true); + lGenerator.SetRotationNumber(++rotatate); + rotationUsed = true; + } + } + } + else + { + if (lGenerator.IsRotationNeeded()) + { + lGenerator.SetRotate(true); + lGenerator.SetRotationNumber(++rotatate); + rotationUsed = true; + } } lGenerator.SetShift(lGenerator.GetShift()/2.0); break;