Change starting shift value. It must be small enough to cover shape of long
pieces. --HG-- branch : develop
This commit is contained in:
parent
48bb83a80e
commit
928626d6be
|
@ -665,22 +665,6 @@ bool VBank::ArrangedDetail(QMap<uint, QMultiMap<qint64, int>> &container, int i)
|
|||
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
|
||||
{
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
int ArrangedCount() const;
|
||||
|
||||
qreal GetBiggestDiagonal() const;
|
||||
qreal DetailsBiggestEdge() const;
|
||||
|
||||
bool IsRotationNeeded() const;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ void VLayoutGenerator::Generate(const QElapsedTimer &timer, qint64 timeout, Layo
|
|||
{
|
||||
if (bank->PrepareDetails())
|
||||
{
|
||||
SetShift(bank->DetailsBiggestEdge() + 1);
|
||||
SetShift(ToPixel(1, Unit::Cm));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user