Fix bug. Hiding a main path making impossible to move a piece.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-08-01 12:59:31 +03:00
parent 651d22e488
commit c822464064
2 changed files with 14 additions and 0 deletions

View File

@ -817,6 +817,19 @@ QRectF VToolSeamAllowance::boundingRect() const
} }
} }
//---------------------------------------------------------------------------------------------------------------------
QPainterPath VToolSeamAllowance::shape() const
{
if (m_mainPath == QPainterPath())
{
return QGraphicsPathItem::shape();
}
else
{
return ItemShapeFromPath(m_mainPath, pen());
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolSeamAllowance::AddToFile() void VToolSeamAllowance::AddToFile()
{ {

View File

@ -97,6 +97,7 @@ public:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) Q_DECL_OVERRIDE; QWidget *widget) Q_DECL_OVERRIDE;
virtual QRectF boundingRect() const Q_DECL_OVERRIDE; virtual QRectF boundingRect() const Q_DECL_OVERRIDE;
virtual QPainterPath shape() const Q_DECL_OVERRIDE;
public slots: public slots:
virtual void FullUpdateFromFile () Q_DECL_OVERRIDE; virtual void FullUpdateFromFile () Q_DECL_OVERRIDE;
void EnableToolMove(bool move); void EnableToolMove(bool move);