From ed63b9782750a3d3fe7a747a3b5343e52c43a9b8 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 27 Sep 2013 18:00:51 +0300 Subject: [PATCH] Remove tool will be disabled, when value reference more than 1. --- container/vpointf.cpp | 19 +++++++-- container/vpointf.h | 1 + tools/drawTools/vdrawtool.h | 7 +++- tools/drawTools/vtoolalongline.cpp | 7 +++- tools/drawTools/vtoolarc.cpp | 7 +++- tools/drawTools/vtoolbisector.cpp | 7 +++- tools/drawTools/vtoolendline.cpp | 15 +++++--- tools/drawTools/vtoollineintersect.cpp | 7 +++- tools/drawTools/vtoolnormal.cpp | 7 +++- tools/drawTools/vtoolpointofcontact.cpp | 7 +++- tools/drawTools/vtoolshoulderpoint.cpp | 7 +++- tools/drawTools/vtoolspline.cpp | 7 +++- tools/drawTools/vtoolsplinepath.cpp | 7 +++- xml/vdomdocument.cpp | 51 +++++++++++++------------ 14 files changed, 113 insertions(+), 43 deletions(-) diff --git a/container/vpointf.cpp b/container/vpointf.cpp index f11278871..ca1a9d23e 100644 --- a/container/vpointf.cpp +++ b/container/vpointf.cpp @@ -26,11 +26,24 @@ VPointF::VPointF():_name(QString()), _mx(0), _my(0), _x(0), _y(0), _referens(0), } VPointF::VPointF ( const VPointF & point ):_name(point.name()), _mx(point.mx()), _my(point.my()), - _x(point.x()), _y(point.y()), _referens(0), mode(point.getMode()), idObject(point.getIdObject()){ + _x(point.x()), _y(point.y()), _referens(point.referens()), mode(point.getMode()), + idObject(point.getIdObject()){ } -VPointF::VPointF (qreal x, qreal y , QString name, qreal mx, qreal my, Draw::Mode mode, qint64 idObject):_name(name), _mx(mx), - _my(my), _x(x), _y(y), _referens(0), mode(mode), idObject(idObject){ +VPointF::VPointF (qreal x, qreal y , QString name, qreal mx, qreal my, Draw::Mode mode, qint64 idObject): + _name(name), _mx(mx), _my(my), _x(x), _y(y), _referens(0), mode(mode), idObject(idObject){ +} + +VPointF &VPointF::operator =(const VPointF &point){ + _name = point.name(); + _mx = point.mx(); + _my = point.my(); + _x = point.x(); + _y = point.y(); + _referens = point.referens(); + mode = point.getMode(); + idObject = point.getIdObject(); + return *this; } VPointF::~VPointF(){ diff --git a/container/vpointf.h b/container/vpointf.h index 32abd7eab..b1c0e69d0 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -33,6 +33,7 @@ public: VPointF (const VPointF &point ); VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, Draw::Mode mode = Draw::Calculation, qint64 idObject = 0); + VPointF &operator=(const VPointF &point); ~VPointF(); QString name() const; qreal mx() const; diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index a95ecfa27..af1e2859b 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -50,10 +50,13 @@ protected: bool showRemove = true){ if(!ignoreContextMenuEvent){ QMenu menu; - QAction *actionOption = menu.addAction("Властивості"); + QAction *actionOption = menu.addAction(tr("Options")); QAction *actionRemove; if(showRemove){ - actionRemove = menu.addAction("Видалити"); + actionRemove = menu.addAction(tr("Delete")); + } else { + actionRemove = menu.addAction(tr("Delete")); + actionRemove->setEnabled(false); } QAction *selectedAction = menu.exec(event->screenPos()); if(selectedAction == actionOption){ diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index 2f9242fcd..e3aff41dc 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -65,7 +65,12 @@ void VToolAlongLine::FullUpdateFromGui(int result){ } void VToolAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogAlongLine, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogAlongLine, this, event, false); + } else { + ContextMenu(dialogAlongLine, this, event); + } } void VToolAlongLine::AddToFile(){ diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index fa23101e0..d03cac688 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -156,7 +156,12 @@ void VToolArc::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ } void VToolArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogArc, this, event); + VArc arc = VDrawTool::data.GetArc(id); + if(arc.referens() > 1){ + ContextMenu(dialogArc, this, event, false); + } else { + ContextMenu(dialogArc, this, event); + } } void VToolArc::AddToFile(){ diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index 19d645981..74ea91c20 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -147,7 +147,12 @@ void VToolBisector::FullUpdateFromGui(int result){ } void VToolBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogBisector, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogBisector, this, event, false); + } else { + ContextMenu(dialogBisector, this, event); + } } void VToolBisector::AddToFile(){ diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index b2eeead5e..081457c02 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -79,10 +79,9 @@ void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QStr if(parse != Document::FullParse){ QMap* tools = doc->getTools(); VDataTool *tool = tools->value(id); - if(tool != 0){ - tool->VDataTool::setData(data); - data->IncrementReferens(id, Scene::Point); - } + Q_CHECK_PTR(tool); + data->IncrementReferens(id, Scene::Point); + tool->VDataTool::setData(data); } } data->AddLine(basePointId, id); @@ -94,6 +93,7 @@ void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QStr connect(point, &VToolPoint::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); connect(point, &VToolPoint::RemoveTool, scene, &VMainGraphicsScene::RemoveTool); QMap* tools = doc->getTools(); + Q_CHECK_PTR(tools); tools->insert(id,point); } } @@ -111,7 +111,12 @@ void VToolEndLine::FullUpdateFromFile(){ } void VToolEndLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogEndLine, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogEndLine, this, event, false); + } else { + ContextMenu(dialogEndLine, this, event); + } } void VToolEndLine::FullUpdateFromGui(int result){ diff --git a/tools/drawTools/vtoollineintersect.cpp b/tools/drawTools/vtoollineintersect.cpp index 4f47d0955..66d2d7cf1 100644 --- a/tools/drawTools/vtoollineintersect.cpp +++ b/tools/drawTools/vtoollineintersect.cpp @@ -128,7 +128,12 @@ void VToolLineIntersect::FullUpdateFromGui(int result){ } void VToolLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogLineIntersect, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogLineIntersect, this, event, false); + } else { + ContextMenu(dialogLineIntersect, this, event); + } } void VToolLineIntersect::AddToFile(){ diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 155b458a2..6f1bef49d 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -138,7 +138,12 @@ void VToolNormal::FullUpdateFromGui(int result){ } void VToolNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogNormal, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogNormal, this, event, false); + } else { + ContextMenu(dialogNormal, this, event); + } } void VToolNormal::AddToFile(){ diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index 5993729b7..6f3b723ca 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -147,7 +147,12 @@ void VToolPointOfContact::FullUpdateFromGui(int result){ } void VToolPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogPointOfContact, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogPointOfContact, this, event, false); + } else { + ContextMenu(dialogPointOfContact, this, event); + } } void VToolPointOfContact::AddToFile(){ diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index 9fb730b7e..4ea170dd8 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -156,7 +156,12 @@ void VToolShoulderPoint::FullUpdateFromGui(int result){ } void VToolShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogShoulderPoint, this, event); + VPointF point = VDrawTool::data.GetPoint(id); + if(point.referens() > 1){ + ContextMenu(dialogShoulderPoint, this, event, false); + } else { + ContextMenu(dialogShoulderPoint, this, event); + } } void VToolShoulderPoint::AddToFile(){ diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index 142f1ad9d..c7c18e65d 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -177,7 +177,12 @@ void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePo } void VToolSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogSpline, this, event); + VSpline spl = VDrawTool::data.GetSpline(id); + if(spl.referens() > 1){ + ContextMenu(dialogSpline, this, event, false); + } else { + ContextMenu(dialogSpline, this, event); + } } void VToolSpline::AddToFile(){ diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index 001df4566..725c92e75 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -216,7 +216,12 @@ void VToolSplinePath::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ } void VToolSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ - ContextMenu(dialogSplinePath, this, event); + VSplinePath path = VDrawTool::data.GetSplinePath(id); + if(path.referens() > 1){ + ContextMenu(dialogSplinePath, this, event, false); + } else { + ContextMenu(dialogSplinePath, this, event); + } } void VToolSplinePath::AddToFile(){ diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 166e5d292..78daafaf6 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -567,6 +567,7 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen QString formula = GetParametrString(domElement, "length"); qint64 basePointId = GetParametrLongLong(domElement, "basePoint"); qreal angle = GetParametrDouble(domElement, "angle"); + data->IncrementReferens(basePointId, Scene::Point, mode); if(mode == Draw::Calculation){ VToolEndLine::Create(id, name, typeLine, formula, angle, basePointId, mx, my, scene, this, data, parse, Tool::FromFile); @@ -574,7 +575,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingEndLine::Create(id, name, typeLine, formula, angle, basePointId, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(basePointId, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -593,6 +593,8 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen QString formula = GetParametrString(domElement, "length"); qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); + data->IncrementReferens(firstPointId, Scene::Point, mode); + data->IncrementReferens(secondPointId, Scene::Point, mode); if(mode == Draw::Calculation){ VToolAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, scene, this, data, parse, Tool::FromFile); @@ -600,8 +602,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(firstPointId, Scene::Point, mode); - data->IncrementReferens(secondPointId, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -621,6 +621,9 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 p1Line = GetParametrLongLong(domElement, "p1Line"); qint64 p2Line = GetParametrLongLong(domElement, "p2Line"); qint64 pShoulder = GetParametrLongLong(domElement, "pShoulder"); + data->IncrementReferens(p1Line, Scene::Point, mode); + data->IncrementReferens(p2Line, Scene::Point, mode); + data->IncrementReferens(pShoulder, Scene::Point, mode); if(mode == Draw::Calculation){ VToolShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, scene, this, data, parse, Tool::FromFile); @@ -628,9 +631,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(p1Line, Scene::Point, mode); - data->IncrementReferens(p2Line, Scene::Point, mode); - data->IncrementReferens(pShoulder, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -650,6 +650,8 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); qreal angle = GetParametrDouble(domElement, "angle"); + data->IncrementReferens(firstPointId, Scene::Point, mode); + data->IncrementReferens(secondPointId, Scene::Point, mode); if(mode == Draw::Calculation){ VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, scene, this, data, parse, Tool::FromFile); @@ -657,8 +659,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(firstPointId, Scene::Point, mode); - data->IncrementReferens(secondPointId, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -678,6 +678,9 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); qint64 thirdPointId = GetParametrLongLong(domElement, "thirdPoint"); + data->IncrementReferens(firstPointId, Scene::Point, mode); + data->IncrementReferens(secondPointId, Scene::Point, mode); + data->IncrementReferens(thirdPointId, Scene::Point, mode); if(mode == Draw::Calculation){ VToolBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId, typeLine, name, mx, my, scene, this, data, parse, Tool::FromFile); @@ -685,9 +688,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId, typeLine, name, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(firstPointId, Scene::Point, mode); - data->IncrementReferens(secondPointId, Scene::Point, mode); - data->IncrementReferens(thirdPointId, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -706,6 +706,10 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 p2Line1Id = GetParametrLongLong(domElement, "p2Line1"); qint64 p1Line2Id = GetParametrLongLong(domElement, "p1Line2"); qint64 p2Line2Id = GetParametrLongLong(domElement, "p2Line2"); + data->IncrementReferens(p1Line1Id, Scene::Point, mode); + data->IncrementReferens(p2Line1Id, Scene::Point, mode); + data->IncrementReferens(p1Line2Id, Scene::Point, mode); + data->IncrementReferens(p2Line2Id, Scene::Point, mode); if(mode == Draw::Calculation){ VToolLineIntersect::Create(id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, name, mx, my, scene, this, data, parse, Tool::FromFile); @@ -713,10 +717,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingLineIntersect::Create(id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, name, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(p1Line1Id, Scene::Point, mode); - data->IncrementReferens(p2Line1Id, Scene::Point, mode); - data->IncrementReferens(p1Line2Id, Scene::Point, mode); - data->IncrementReferens(p2Line2Id, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -735,6 +735,9 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 center = GetParametrLongLong(domElement, "center"); qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); + data->IncrementReferens(center, Scene::Point, mode); + data->IncrementReferens(firstPointId, Scene::Point, mode); + data->IncrementReferens(secondPointId, Scene::Point, mode); if(mode == Draw::Calculation){ VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, scene, this, data, parse, Tool::FromFile); @@ -742,9 +745,6 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VModelingPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, this, data, parse, Tool::FromFile); } - data->IncrementReferens(center, Scene::Point, mode); - data->IncrementReferens(firstPointId, Scene::Point, mode); - data->IncrementReferens(secondPointId, Scene::Point, mode); return; } catch(const VExceptionBadId &e){ @@ -790,13 +790,14 @@ void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement qint64 id = GetParametrId(domElement); qint64 firstPoint = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPoint = GetParametrLongLong(domElement, "secondPoint"); + data->IncrementReferens(firstPoint, Scene::Point, mode); + data->IncrementReferens(secondPoint, Scene::Point, mode); if(mode == Draw::Calculation){ VToolLine::Create(id, firstPoint, secondPoint, scene, this, data, parse, Tool::FromFile); } else { VModelingLine::Create(id, firstPoint, secondPoint, this, data, parse, Tool::FromFile); } - data->IncrementReferens(firstPoint, Scene::Point, mode); - data->IncrementReferens(secondPoint, Scene::Point, mode); + } catch(const VExceptionBadId &e){ VExceptionObjectError excep(tr("Error creating or updating line"), domElement); @@ -820,6 +821,8 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme qreal kAsm1 = GetParametrDouble(domElement, "kAsm1"); qreal kAsm2 = GetParametrDouble(domElement, "kAsm2"); qreal kCurve = GetParametrDouble(domElement, "kCurve"); + data->IncrementReferens(point1, Scene::Point, mode); + data->IncrementReferens(point4, Scene::Point, mode); if(mode == Draw::Calculation){ VToolSpline::Create(id, point1, point4, kAsm1, kAsm2, angle1, angle2, kCurve, scene, this, data, parse, Tool::FromFile); @@ -827,8 +830,7 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme VModelingSpline::Create(id, point1, point4, kAsm1, kAsm2, angle1, angle2, kCurve, this, data, parse, Tool::FromFile); } - data->IncrementReferens(point1, Scene::Point, mode); - data->IncrementReferens(point4, Scene::Point, mode); + return; } catch(const VExceptionBadId &e){ @@ -888,7 +890,6 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme } spl.setMode(typeObject); spl.setIdObject(idObject); - data->UpdateModelingSpline(id, spl); if(typeObject == Draw::Calculation){ data->IncrementReferens(spl.GetP1(), Scene::Point, Draw::Calculation); data->IncrementReferens(spl.GetP4(), Scene::Point, Draw::Calculation); @@ -896,6 +897,7 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme data->IncrementReferens(spl.GetP1(), Scene::Point, Draw::Modeling); data->IncrementReferens(spl.GetP4(), Scene::Point, Draw::Modeling); } + data->UpdateModelingSpline(id, spl); return; } catch(const VExceptionBadId &e){ @@ -951,12 +953,13 @@ void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement QString radius = GetParametrString(domElement, "radius"); QString f1 = GetParametrString(domElement, "angle1"); QString f2 = GetParametrString(domElement, "angle2"); + data->IncrementReferens(center, Scene::Point, mode); if(mode == Draw::Calculation){ VToolArc::Create(id, center, radius, f1, f2, scene, this, data, parse, Tool::FromFile); } else { VModelingArc::Create(id, center, radius, f1, f2, this, data, parse, Tool::FromFile); } - data->IncrementReferens(center, Scene::Point, mode); + return; } catch(const VExceptionBadId &e){