Fixed issue #51.

--HG--
branch : develop
This commit is contained in:
dismine 2014-01-18 12:02:24 +02:00
parent add722d0c5
commit 15f4bc1e12
2 changed files with 16 additions and 1 deletions

View File

@ -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<const VPointF *>(firstPointId)->name();
QString secondPointIdName = data->GeometricObject<const VPointF *>(secondPointId)->name();
QString toolIdName = data->GeometricObject<const VPointF *>(tool.getId())->name();
record = QString(tr("%1 - point of intersection %2 and %3")).arg(toolIdName, firstPointIdName,
secondPointIdName);
}
break;
case Tool::CutArcTool:
{
qint64 arcId = 0;

View File

@ -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,