From 09aface0139a7e699955f508eb4bd8d927e790ff Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 25 Apr 2014 16:41:50 +0400 Subject: [PATCH] refs #30 - Sketch base GUI: create, draw lines Correction for Direction save. --- src/GeomDataAPI/GeomDataAPI_Dir.h | 2 +- src/Model/Model_Data.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GeomDataAPI/GeomDataAPI_Dir.h b/src/GeomDataAPI/GeomDataAPI_Dir.h index 90ab61614..92018306c 100644 --- a/src/GeomDataAPI/GeomDataAPI_Dir.h +++ b/src/GeomDataAPI/GeomDataAPI_Dir.h @@ -27,7 +27,7 @@ public: virtual double z() const = 0; /// Returns the type of this class of attributes - static inline std::string type() {return std::string("Point");} + static inline std::string type() {return std::string("Dir");} /// Returns the type of this class of attributes, not static method virtual std::string attributeType() {return type();} diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 121cd1902..0bb5a12c8 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include using namespace std; @@ -43,6 +44,8 @@ void Model_Data::addAttribute(string theID, string theAttrType) anAttr = new Model_AttributeDouble(anAttrLab); else if (theAttrType == GeomData_Point::type()) anAttr = new GeomData_Point(anAttrLab); + else if (theAttrType == GeomData_Dir::type()) + anAttr = new GeomData_Dir(anAttrLab); else if (theAttrType == GeomData_Point2D::type()) anAttr = new GeomData_Point2D(anAttrLab); -- 2.39.2