From c82246406406846ffe6070de85cd7d6ff23d5224 Mon Sep 17 00:00:00 2001
From: Roman Telezhynskyi <kroluku@gmail.com>
Date: Tue, 1 Aug 2017 12:59:31 +0300
Subject: [PATCH] Fix bug. Hiding a main path making impossible to move a
 piece.

--HG--
branch : develop
---
 src/libs/vtools/tools/vtoolseamallowance.cpp | 13 +++++++++++++
 src/libs/vtools/tools/vtoolseamallowance.h   |  1 +
 2 files changed, 14 insertions(+)

diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp
index abed9fe76..d2d5deb29 100644
--- a/src/libs/vtools/tools/vtoolseamallowance.cpp
+++ b/src/libs/vtools/tools/vtoolseamallowance.cpp
@@ -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()
 {
diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h
index ed1320fc0..d11f8fd4c 100644
--- a/src/libs/vtools/tools/vtoolseamallowance.h
+++ b/src/libs/vtools/tools/vtoolseamallowance.h
@@ -97,6 +97,7 @@ public:
     virtual void         paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
                                QWidget *widget) Q_DECL_OVERRIDE;
     virtual QRectF       boundingRect() const Q_DECL_OVERRIDE;
+    virtual QPainterPath shape() const Q_DECL_OVERRIDE;
 public slots:
     virtual void FullUpdateFromFile () Q_DECL_OVERRIDE;
     void         EnableToolMove(bool move);