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"); 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:

View File

@ -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:

View File

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

View File

@ -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
{ {

View File

@ -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