Updated the tool "Point of intersection curves" to new correct way work with
references. --HG-- branch : develop
This commit is contained in:
parent
233415bc67
commit
fb6e3b29ff
|
@ -121,8 +121,8 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(const qui
|
||||||
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPointOfIntersectionCurves::Disable);
|
connect(scene, &VMainGraphicsScene::DisableItem, point, &VToolPointOfIntersectionCurves::Disable);
|
||||||
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolPointOfIntersectionCurves::EnableToolMove);
|
connect(scene, &VMainGraphicsScene::EnableToolMove, point, &VToolPointOfIntersectionCurves::EnableToolMove);
|
||||||
doc->AddTool(id, point);
|
doc->AddTool(id, point);
|
||||||
doc->IncrementReferens(firstCurveId);
|
doc->IncrementReferens(curve1->getIdTool());
|
||||||
doc->IncrementReferens(secondCurveId);
|
doc->IncrementReferens(curve2->getIdTool());
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -324,8 +324,11 @@ void VToolPointOfIntersectionCurves::ShowVisualization(bool show)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolPointOfIntersectionCurves::RemoveReferens()
|
void VToolPointOfIntersectionCurves::RemoveReferens()
|
||||||
{
|
{
|
||||||
doc->DecrementReferens(firstCurveId);
|
const auto curve1 = VAbstractTool::data.GetGObject(firstCurveId);
|
||||||
doc->DecrementReferens(secondCurveId);
|
const auto curve2 = VAbstractTool::data.GetGObject(secondCurveId);
|
||||||
|
|
||||||
|
doc->DecrementReferens(curve1->getIdTool());
|
||||||
|
doc->DecrementReferens(curve2->getIdTool());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user