diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index dfd0bbcd6c..b938261953 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -216,6 +216,18 @@ PropertyVectorDistance::PropertyVectorDistance() } +const boost::any PropertyVectorDistance::getPathValue(const ObjectIdentifier &path) const +{ + std::string p = path.getSubPathStr(); + + if (p == ".x" || p == ".y" || p == ".z") { + // Convert double to quantity + return Base::Quantity(boost::any_cast(Property::getPathValue(path)), Unit::Length); + } + else + return Property::getPathValue(path); +} + PropertyVectorDistance::~PropertyVectorDistance() { diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index db54b7e1a4..4d48d08fb2 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -120,6 +120,8 @@ public: */ virtual ~PropertyVectorDistance(); + const boost::any getPathValue(const ObjectIdentifier &path) const; + const char* getEditorName(void) const { return "Gui::PropertyEditor::PropertyVectorDistanceItem"; }