Tool Seam allowance's bounding box should not include passmarks.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-07-11 13:05:48 +03:00
parent 03e6a4304f
commit 9475da34b8
2 changed files with 6 additions and 6 deletions

View File

@ -793,6 +793,7 @@ void VToolSeamAllowance::paint(QPainter *painter, const QStyleOptionGraphicsItem
setPen(toolPen);
m_seamAllowance->setPen(toolPen);
m_passmarks->setPen(toolPen);
if ((m_dataLabel->IsIdle() == false
|| m_patternInfo->IsIdle() == false
@ -1101,7 +1102,8 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
m_seamAllowance(new VNoBrushScalePathItem(this)),
m_dataLabel(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);
InitNodes(detail, scene);
@ -1184,11 +1186,8 @@ void VToolSeamAllowance::RefreshGeometry()
m_seamAllowance->setBrush(QBrush(Qt::NoBrush)); // Disable if the main path was hidden
}
{
QPainterPath mainPath = path;
mainPath.addPath(detail.PassmarksPath(this->getData()));
this->setPath(mainPath);
}
this->setPath(path);
m_passmarks->setPath(detail.PassmarksPath(this->getData()));
this->setPos(detail.GetMx(), detail.GetMy());

View File

@ -146,6 +146,7 @@ private:
VTextGraphicsItem *m_dataLabel;
VTextGraphicsItem *m_patternInfo;
VGrainlineItem *m_grainLine;
QGraphicsPathItem *m_passmarks;
VToolSeamAllowance(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation,
VMainGraphicsScene *scene, const QString &drawName, QGraphicsItem * parent = nullptr);