Change starting shift value. It must be small enough to cover shape of long

pieces.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-07-21 10:10:41 +03:00
parent 48bb83a80e
commit 928626d6be
3 changed files with 1 additions and 18 deletions

View File

@ -665,22 +665,6 @@ bool VBank::ArrangedDetail(QMap<uint, QMultiMap<qint64, int>> &container, int i)
return false; return false;
} }
//---------------------------------------------------------------------------------------------------------------------
qreal VBank::DetailsBiggestEdge() const
{
qreal edge = 0;
for(auto &piece : details)
{
const qreal pieceEdge = piece.BiggestEdge();
if (pieceEdge > edge)
{
edge = pieceEdge;
}
}
return edge;
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
bool VBank::IsRotationNeeded() const bool VBank::IsRotationNeeded() const
{ {

View File

@ -77,7 +77,6 @@ public:
int ArrangedCount() const; int ArrangedCount() const;
qreal GetBiggestDiagonal() const; qreal GetBiggestDiagonal() const;
qreal DetailsBiggestEdge() const;
bool IsRotationNeeded() const; bool IsRotationNeeded() const;

View File

@ -127,7 +127,7 @@ void VLayoutGenerator::Generate(const QElapsedTimer &timer, qint64 timeout, Layo
{ {
if (bank->PrepareDetails()) if (bank->PrepareDetails())
{ {
SetShift(bank->DetailsBiggestEdge() + 1); SetShift(ToPixel(1, Unit::Cm));
} }
else else
{ {