Resolved issue #400. Layout 'fold line' is incorrect.
--HG-- branch : develop
This commit is contained in:
parent
9f87773b8e
commit
7027198f2a
|
@ -264,6 +264,7 @@ INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
|
|||
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
|
||||
|
||||
# The list helps to check that all files are exist.
|
||||
# Don't forget to convert text to curves.
|
||||
DIAGRAMS += \
|
||||
$${PWD}/share/resources/diagrams/Ap1.svg \
|
||||
$${PWD}/share/resources/diagrams/Ap2.svg \
|
||||
|
|
|
@ -422,7 +422,7 @@ void MainWindowsNoGUI::PrepareDetailsForLayout(const QHash<quint32, VDetail> *de
|
|||
VLayoutDetail det = VLayoutDetail();
|
||||
const VDetail &d = idetail.value();
|
||||
det.SetCountourPoints(d.ContourPoints(pattern));
|
||||
det.SetSeamAllowencePoints(d.SeamAllowancePoints(pattern), d.getSeamAllowance());
|
||||
det.SetSeamAllowencePoints(d.SeamAllowancePoints(pattern), d.getSeamAllowance(), d.getClosed());
|
||||
det.setName(d.getName());
|
||||
det.setWidth(qApp->toPixel(d.getWidth()));
|
||||
|
||||
|
|
|
@ -87,11 +87,12 @@ QVector<QPointF> VLayoutDetail::GetSeamAllowencePoints() const
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VLayoutDetail::SetSeamAllowencePoints(const QVector<QPointF> &points, bool seamAllowence)
|
||||
void VLayoutDetail::SetSeamAllowencePoints(const QVector<QPointF> &points, bool seamAllowence, bool closed)
|
||||
{
|
||||
if (seamAllowence)
|
||||
{
|
||||
setSeamAllowance(seamAllowence);
|
||||
setClosed(closed);
|
||||
d->seamAllowence = points;
|
||||
if (not d->seamAllowence.isEmpty())
|
||||
{
|
||||
|
@ -164,7 +165,7 @@ void VLayoutDetail::Mirror(const QLineF &edge)
|
|||
const QLineF axis = QLineF(edge.x2(), edge.y2(), edge.x2() + 100, edge.y2()); // Ox axis
|
||||
|
||||
const qreal angle = edge.angleTo(axis);
|
||||
const QPointF p2 = edge.p2();
|
||||
const QPointF p2 = edge.p2();
|
||||
QTransform m;
|
||||
m.translate(p2.x(), p2.y());
|
||||
m.rotate(-angle);
|
||||
|
@ -215,7 +216,7 @@ QLineF VLayoutDetail::Edge(int i) const
|
|||
if (d->mirror)
|
||||
{
|
||||
const int oldI1 = i1;
|
||||
const int size = d->layoutAllowence.size()-1; //-V807
|
||||
const int size = d->layoutAllowence.size()-1; //-V807
|
||||
i1 = size - i2;
|
||||
i2 = size - oldI1;
|
||||
return QLineF(d->matrix.map(d->layoutAllowence.at(i2)), d->matrix.map(d->layoutAllowence.at(i1)));
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
void SetCountourPoints(const QVector<QPointF> &points);
|
||||
|
||||
QVector<QPointF> GetSeamAllowencePoints() const;
|
||||
void SetSeamAllowencePoints(const QVector<QPointF> &points, bool seamAllowence = true);
|
||||
void SetSeamAllowencePoints(const QVector<QPointF> &points, bool seamAllowence = true, bool closed = true);
|
||||
|
||||
QVector<QPointF> GetLayoutAllowencePoints() const;
|
||||
void SetLayoutAllowencePoints();
|
||||
|
|
Loading…
Reference in New Issue
Block a user