Turn on rotation if successful nesting doesn't improve result.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-20 22:56:48 +03:00
parent a2dfebe6cc
commit 3c289f6d60

View File

@ -338,6 +338,24 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator)
papersCount = lGenerator.PapersCount(); papersCount = lGenerator.PapersCount();
hasResult = true; 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); lGenerator.SetShift(lGenerator.GetShift()/2.0);
break; break;