Don't hide EmptyPaperError by timeout to show real reason.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2019-04-01 19:21:39 +03:00
parent 406108107d
commit f407e969f4

View File

@ -240,8 +240,11 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator)
auto IsTimeout = [&progress, &lGenerator, timer, &nestingState]() auto IsTimeout = [&progress, &lGenerator, timer, &nestingState]()
{ {
if (timer.hasExpired(lGenerator.GetNestingTime() * 60000)) if (timer.hasExpired(lGenerator.GetNestingTime() * 60000))
{
if (nestingState != LayoutErrors::EmptyPaperError)
{ {
nestingState = LayoutErrors::Timeout; nestingState = LayoutErrors::Timeout;
}
progress->Finished(); progress->Finished();
return true; return true;
} }