Fixed automatic layout problem. Don't check workpiece bounding rect because it
is not always correct. --HG-- branch : develop
This commit is contained in:
parent
cc64b0627e
commit
2d3b50637c
|
@ -96,10 +96,6 @@ void DialogLayoutProgress::Error(const LayoutErrors &state)
|
||||||
text = tr("Couldn't prepare data for creation layout");
|
text = tr("Couldn't prepare data for creation layout");
|
||||||
QMessageBox::critical(this, tr("Critical error"), text, QMessageBox::Ok, QMessageBox::Ok);
|
QMessageBox::critical(this, tr("Critical error"), text, QMessageBox::Ok, QMessageBox::Ok);
|
||||||
break;
|
break;
|
||||||
case LayoutErrors::PaperSizeError:
|
|
||||||
text = tr("Wrong paper size");
|
|
||||||
QMessageBox::critical(this, tr("Critical error"), text, QMessageBox::Ok, QMessageBox::Ok);
|
|
||||||
break;
|
|
||||||
case LayoutErrors::ProcessStoped:
|
case LayoutErrors::ProcessStoped:
|
||||||
break;
|
break;
|
||||||
case LayoutErrors::EmptyPaperError:
|
case LayoutErrors::EmptyPaperError:
|
||||||
|
|
|
@ -118,7 +118,6 @@ void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
|
||||||
case LayoutErrors::ProcessStoped:
|
case LayoutErrors::ProcessStoped:
|
||||||
break;
|
break;
|
||||||
case LayoutErrors::PrepareLayoutError:
|
case LayoutErrors::PrepareLayoutError:
|
||||||
case LayoutErrors::PaperSizeError:
|
|
||||||
case LayoutErrors::EmptyPaperError:
|
case LayoutErrors::EmptyPaperError:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -35,7 +35,6 @@ enum class LayoutErrors : char
|
||||||
{
|
{
|
||||||
NoError,
|
NoError,
|
||||||
PrepareLayoutError,
|
PrepareLayoutError,
|
||||||
PaperSizeError,
|
|
||||||
ProcessStoped,
|
ProcessStoped,
|
||||||
EmptyPaperError
|
EmptyPaperError
|
||||||
};
|
};
|
||||||
|
|
|
@ -92,7 +92,6 @@ void VLayoutGenerator::Generate()
|
||||||
|
|
||||||
if (bank->Prepare())
|
if (bank->Prepare())
|
||||||
{
|
{
|
||||||
CheckDetailsSize();
|
|
||||||
while (bank->AllDetailsCount() > 0)
|
while (bank->AllDetailsCount() > 0)
|
||||||
{
|
{
|
||||||
if (stopGeneration)
|
if (stopGeneration)
|
||||||
|
@ -256,18 +255,6 @@ void VLayoutGenerator::SetRotate(bool value)
|
||||||
rotate = 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
|
int VLayoutGenerator::GetPaperWidth() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,8 +105,6 @@ private:
|
||||||
bool autoCrop;
|
bool autoCrop;
|
||||||
bool saveLength;
|
bool saveLength;
|
||||||
bool unitePages;
|
bool unitePages;
|
||||||
|
|
||||||
void CheckDetailsSize();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VLAYOUTGENERATOR_H
|
#endif // VLAYOUTGENERATOR_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user