From 15f4bc1e12b543c761d234c3e064dd496bd09646 Mon Sep 17 00:00:00 2001 From: dismine Date: Sat, 18 Jan 2014 12:02:24 +0200 Subject: [PATCH] Fixed issue #51. --HG-- branch : develop --- src/dialogs/dialoghistory.cpp | 15 +++++++++++++++ src/tools/drawTools/vtoolpointofintersection.cpp | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/dialogs/dialoghistory.cpp b/src/dialogs/dialoghistory.cpp index 7182f6625..3f46e02cc 100644 --- a/src/dialogs/dialoghistory.cpp +++ b/src/dialogs/dialoghistory.cpp @@ -364,6 +364,21 @@ QString DialogHistory::Record(const VToolRecord &tool) firstPointIdName, secondPointIdName); break; } + case Tool::PointOfIntersection: + { + domElement = doc->elementById(QString().setNum(tool.getId())); + if (domElement.isElement()) + { + firstPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrFirstPoint, "0"); + secondPointId = doc->GetParametrLongLong(domElement, VAbstractTool::AttrSecondPoint, "0"); + } + QString firstPointIdName = data->GeometricObject(firstPointId)->name(); + QString secondPointIdName = data->GeometricObject(secondPointId)->name(); + QString toolIdName = data->GeometricObject(tool.getId())->name(); + record = QString(tr("%1 - point of intersection %2 and %3")).arg(toolIdName, firstPointIdName, + secondPointIdName); + } + break; case Tool::CutArcTool: { qint64 arcId = 0; diff --git a/src/tools/drawTools/vtoolpointofintersection.cpp b/src/tools/drawTools/vtoolpointofintersection.cpp index 21cc206cb..c403dcd92 100644 --- a/src/tools/drawTools/vtoolpointofintersection.cpp +++ b/src/tools/drawTools/vtoolpointofintersection.cpp @@ -87,7 +87,7 @@ void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName doc->UpdateToolData(id, data); } } - VDrawTool::AddRecord(id, Tool::Triangle, doc); + VDrawTool::AddRecord(id, Tool::PointOfIntersection, doc); if (parse == Document::FullParse) { VToolPointOfIntersection *point = new VToolPointOfIntersection(doc, data, id, firstPointId,