Fixed automatic layout problem. Don't check workpiece bounding rect because it

is not always correct.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-07-07 10:47:10 +03:00
parent cc64b0627e
commit 2d3b50637c
5 changed files with 0 additions and 21 deletions

View File

@ -96,10 +96,6 @@ void DialogLayoutProgress::Error(const LayoutErrors &state)
text = tr("Couldn't prepare data for creation layout");
QMessageBox::critical(this, tr("Critical error"), text, QMessageBox::Ok, QMessageBox::Ok);
break;
case LayoutErrors::PaperSizeError:
text = tr("Wrong paper size");
QMessageBox::critical(this, tr("Critical error"), text, QMessageBox::Ok, QMessageBox::Ok);
break;
case LayoutErrors::ProcessStoped:
break;
case LayoutErrors::EmptyPaperError:

View File

@ -118,7 +118,6 @@ void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
case LayoutErrors::ProcessStoped:
break;
case LayoutErrors::PrepareLayoutError:
case LayoutErrors::PaperSizeError:
case LayoutErrors::EmptyPaperError:
break;
default:

View File

@ -35,7 +35,6 @@ enum class LayoutErrors : char
{
NoError,
PrepareLayoutError,
PaperSizeError,
ProcessStoped,
EmptyPaperError
};

View File

@ -92,7 +92,6 @@ void VLayoutGenerator::Generate()
if (bank->Prepare())
{
CheckDetailsSize();
while (bank->AllDetailsCount() > 0)
{
if (stopGeneration)
@ -256,18 +255,6 @@ void VLayoutGenerator::SetRotate(bool value)
rotate = value;
}
//---------------------------------------------------------------------------------------------------------------------
void VLayoutGenerator::CheckDetailsSize()
{
const QRectF rec = bank->GetBiggestBoundingRect();
if (rec.width() > paperWidth || rec.height() > paperHeight)
{
state = LayoutErrors::PaperSizeError;
emit Error(state);
stopGeneration = true;
}
}
//---------------------------------------------------------------------------------------------------------------------
int VLayoutGenerator::GetPaperWidth() const
{

View File

@ -105,8 +105,6 @@ private:
bool autoCrop;
bool saveLength;
bool unitePages;
void CheckDetailsSize();
};
#endif // VLAYOUTGENERATOR_H