diff --git a/src/libs/vlayout/vcontour.cpp b/src/libs/vlayout/vcontour.cpp index 8f08a3c73..9de9add9c 100644 --- a/src/libs/vlayout/vcontour.cpp +++ b/src/libs/vlayout/vcontour.cpp @@ -203,8 +203,7 @@ int VContour::EdgesCount() const return 1; } - const QLineF axis = QLineF(0, 0, d->paperWidth, 0); - const int n = qFloor(axis.length()/d->shift); + const int n = qFloor(EmptySheetEdge().length()/d->shift); if (n <= 0) { return 1; @@ -226,7 +225,7 @@ QLineF VContour::GlobalEdge(int i) const if (d->globalContour.isEmpty()) { // Because sheet is blank we have one global edge for all cases - Ox axis. - const QLineF axis = QLineF(0, 0, d->paperWidth - 5, 0); + const QLineF axis = EmptySheetEdge(); if (d->shift == 0) { return axis; @@ -318,3 +317,9 @@ void VContour::AppendWhole(QVector &contour, const VLayoutDetail &detai ++j; }while (processedEdges < nD); } + +//--------------------------------------------------------------------------------------------------------------------- +QLineF VContour::EmptySheetEdge() const +{ + return QLineF(0, 0, d->paperWidth - 5, 0); +} diff --git a/src/libs/vlayout/vcontour.h b/src/libs/vlayout/vcontour.h index bef34f6d0..ed1d710fa 100644 --- a/src/libs/vlayout/vcontour.h +++ b/src/libs/vlayout/vcontour.h @@ -62,6 +62,7 @@ public: QVector UniteWithContour(const VLayoutDetail &detail, int globalI, int detJ, BestFrom type) const; + QLineF EmptySheetEdge() const; int EdgesCount() const; QLineF GlobalEdge(int i) const; QVector CutEdge(const QLineF &edge) const;