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");
|
||||
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:
|
||||
|
|
|
@ -118,7 +118,6 @@ void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
|
|||
case LayoutErrors::ProcessStoped:
|
||||
break;
|
||||
case LayoutErrors::PrepareLayoutError:
|
||||
case LayoutErrors::PaperSizeError:
|
||||
case LayoutErrors::EmptyPaperError:
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -35,7 +35,6 @@ enum class LayoutErrors : char
|
|||
{
|
||||
NoError,
|
||||
PrepareLayoutError,
|
||||
PaperSizeError,
|
||||
ProcessStoped,
|
||||
EmptyPaperError
|
||||
};
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -105,8 +105,6 @@ private:
|
|||
bool autoCrop;
|
||||
bool saveLength;
|
||||
bool unitePages;
|
||||
|
||||
void CheckDetailsSize();
|
||||
};
|
||||
|
||||
#endif // VLAYOUTGENERATOR_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user