Tool Seam allowance's bounding box should not include passmarks.
--HG-- branch : develop
This commit is contained in:
parent
03e6a4304f
commit
9475da34b8
|
@ -793,6 +793,7 @@ void VToolSeamAllowance::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
|
|
||||||
setPen(toolPen);
|
setPen(toolPen);
|
||||||
m_seamAllowance->setPen(toolPen);
|
m_seamAllowance->setPen(toolPen);
|
||||||
|
m_passmarks->setPen(toolPen);
|
||||||
|
|
||||||
if ((m_dataLabel->IsIdle() == false
|
if ((m_dataLabel->IsIdle() == false
|
||||||
|| m_patternInfo->IsIdle() == false
|
|| m_patternInfo->IsIdle() == false
|
||||||
|
@ -1101,7 +1102,8 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
|
||||||
m_seamAllowance(new VNoBrushScalePathItem(this)),
|
m_seamAllowance(new VNoBrushScalePathItem(this)),
|
||||||
m_dataLabel(new VTextGraphicsItem(this)),
|
m_dataLabel(new VTextGraphicsItem(this)),
|
||||||
m_patternInfo(new VTextGraphicsItem(this)),
|
m_patternInfo(new VTextGraphicsItem(this)),
|
||||||
m_grainLine(new VGrainlineItem(this))
|
m_grainLine(new VGrainlineItem(this)),
|
||||||
|
m_passmarks(new QGraphicsPathItem(this))
|
||||||
{
|
{
|
||||||
VPiece detail = data->GetPiece(id);
|
VPiece detail = data->GetPiece(id);
|
||||||
InitNodes(detail, scene);
|
InitNodes(detail, scene);
|
||||||
|
@ -1184,11 +1186,8 @@ void VToolSeamAllowance::RefreshGeometry()
|
||||||
m_seamAllowance->setBrush(QBrush(Qt::NoBrush)); // Disable if the main path was hidden
|
m_seamAllowance->setBrush(QBrush(Qt::NoBrush)); // Disable if the main path was hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
this->setPath(path);
|
||||||
QPainterPath mainPath = path;
|
m_passmarks->setPath(detail.PassmarksPath(this->getData()));
|
||||||
mainPath.addPath(detail.PassmarksPath(this->getData()));
|
|
||||||
this->setPath(mainPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->setPos(detail.GetMx(), detail.GetMy());
|
this->setPos(detail.GetMx(), detail.GetMy());
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,7 @@ private:
|
||||||
VTextGraphicsItem *m_dataLabel;
|
VTextGraphicsItem *m_dataLabel;
|
||||||
VTextGraphicsItem *m_patternInfo;
|
VTextGraphicsItem *m_patternInfo;
|
||||||
VGrainlineItem *m_grainLine;
|
VGrainlineItem *m_grainLine;
|
||||||
|
QGraphicsPathItem *m_passmarks;
|
||||||
|
|
||||||
VToolSeamAllowance(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation,
|
VToolSeamAllowance(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation,
|
||||||
VMainGraphicsScene *scene, const QString &drawName, QGraphicsItem * parent = nullptr);
|
VMainGraphicsScene *scene, const QString &drawName, QGraphicsItem * parent = nullptr);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user