Removed brush for main path.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-12-03 18:51:36 +02:00
parent 641a807f24
commit ffa241ea0d
2 changed files with 7 additions and 7 deletions

View File

@ -488,14 +488,14 @@ QVariant VToolSeamAllowance::itemChange(QGraphicsItem::GraphicsItemChange change
} }
} }
return VNoBrushScalePathItem::itemChange(change, value); return QGraphicsPathItem::itemChange(change, value);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolSeamAllowance::mousePressEvent(QGraphicsSceneMouseEvent *event) void VToolSeamAllowance::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
// Special for not selectable item first need to call standard mousePressEvent then accept event // Special for not selectable item first need to call standard mousePressEvent then accept event
VNoBrushScalePathItem::mousePressEvent(event); QGraphicsPathItem::mousePressEvent(event);
// Somehow clicking on notselectable object do not clean previous selections. // Somehow clicking on notselectable object do not clean previous selections.
if (not (flags() & ItemIsSelectable) && scene()) if (not (flags() & ItemIsSelectable) && scene())
@ -528,7 +528,7 @@ void VToolSeamAllowance::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
//Disable cursor-arrow-closehand //Disable cursor-arrow-closehand
RestoreOverrideCursor(cursorArrowCloseHand); RestoreOverrideCursor(cursorArrowCloseHand);
} }
VNoBrushScalePathItem::mouseReleaseEvent(event); QGraphicsPathItem::mouseReleaseEvent(event);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -630,7 +630,7 @@ void VToolSeamAllowance::keyReleaseEvent(QKeyEvent *event)
break; break;
} }
VNoBrushScalePathItem::keyReleaseEvent ( event ); QGraphicsPathItem::keyReleaseEvent ( event );
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -648,7 +648,7 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
const Source &typeCreation, VMainGraphicsScene *scene, const Source &typeCreation, VMainGraphicsScene *scene,
const QString &drawName, QGraphicsItem *parent) const QString &drawName, QGraphicsItem *parent)
: VAbstractTool(doc, data, id), : VAbstractTool(doc, data, id),
VNoBrushScalePathItem(parent), QGraphicsPathItem(parent),
m_dialog(), m_dialog(),
m_sceneDetails(scene), m_sceneDetails(scene),
m_drawName(drawName), m_drawName(drawName),
@ -662,7 +662,6 @@ VToolSeamAllowance::VToolSeamAllowance(VAbstractPattern *doc, VContainer *data,
this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true);
RefreshGeometry(); RefreshGeometry();
this->setBrush(QBrush(Qt::Dense7Pattern));
m_seamAllowance->setBrush(QBrush(Qt::FDiagPattern)); m_seamAllowance->setBrush(QBrush(Qt::FDiagPattern));
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);

View File

@ -32,6 +32,7 @@
#include <QtGlobal> #include <QtGlobal>
#include <qcompilerdetection.h> #include <qcompilerdetection.h>
#include <QObject> #include <QObject>
#include <QGraphicsPathItem>
#include "../vwidgets/vnobrushscalepathitem.h" #include "../vwidgets/vnobrushscalepathitem.h"
#include "vabstracttool.h" #include "vabstracttool.h"
@ -40,7 +41,7 @@ class VMainGraphicsScene;
class DialogTool; class DialogTool;
class VPiece; class VPiece;
class VToolSeamAllowance : public VAbstractTool, public VNoBrushScalePathItem class VToolSeamAllowance : public VAbstractTool, public QGraphicsPathItem
{ {
Q_OBJECT Q_OBJECT
public: public: