Resolved issue #271. Deny move workpieces when tool union is active.
--HG-- branch : feature
This commit is contained in:
parent
fd658631b3
commit
73c544c45d
|
@ -105,6 +105,8 @@ VToolDetail::VToolDetail(VAbstractPattern *doc, VContainer *data, const quint32
|
||||||
RefreshGeometry();
|
RefreshGeometry();
|
||||||
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
|
||||||
this->setFlag(QGraphicsItem::ItemIsFocusable, true);
|
this->setFlag(QGraphicsItem::ItemIsFocusable, true);
|
||||||
|
|
||||||
|
connect(scene, &VMainGraphicsScene::EnableToolMove, this, &VToolDetail::EnableToolMove);
|
||||||
if (typeCreation == Source::FromGui || typeCreation == Source::FromTool)
|
if (typeCreation == Source::FromGui || typeCreation == Source::FromTool)
|
||||||
{
|
{
|
||||||
AddToFile();
|
AddToFile();
|
||||||
|
@ -607,3 +609,9 @@ void VToolDetail::InitTool(VMainGraphicsScene *scene, const VNodeDetail &node)
|
||||||
tool->setParentItem(this);
|
tool->setParentItem(this);
|
||||||
doc->IncrementReferens(node.getId());
|
doc->IncrementReferens(node.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VToolDetail::EnableToolMove(bool move)
|
||||||
|
{
|
||||||
|
this->setFlag(QGraphicsItem::ItemIsMovable, move);
|
||||||
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void FullUpdateFromFile () Q_DECL_OVERRIDE;
|
virtual void FullUpdateFromFile () Q_DECL_OVERRIDE;
|
||||||
virtual void FullUpdateFromGuiOk(int result);
|
virtual void FullUpdateFromGuiOk(int result);
|
||||||
|
void EnableToolMove(bool move);
|
||||||
protected:
|
protected:
|
||||||
virtual void AddToFile () Q_DECL_OVERRIDE;
|
virtual void AddToFile () Q_DECL_OVERRIDE;
|
||||||
virtual void RefreshDataInFile() Q_DECL_OVERRIDE;
|
virtual void RefreshDataInFile() Q_DECL_OVERRIDE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user