From 705bb1c56efbeb8e778eb7e34280bd923c472c2b Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Fri, 21 Jul 2017 16:30:39 +0200 Subject: [PATCH] Added getPaths(...) to PropertyVector class. --- src/App/PropertyGeo.cpp | 9 +++++++++ src/App/PropertyGeo.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/App/PropertyGeo.cpp b/src/App/PropertyGeo.cpp index 1faed23468..dfd0bbcd6c 100644 --- a/src/App/PropertyGeo.cpp +++ b/src/App/PropertyGeo.cpp @@ -191,6 +191,15 @@ void PropertyVector::Paste(const Property &from) hasSetValue(); } +void PropertyVector::getPaths(std::vector &paths) const +{ + paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName()) + << ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("x"))); + paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName()) + << ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("y"))); + paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName()) + << ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("z"))); +} //************************************************************************** // PropertyVectorDistance diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index 7dbaa9a486..db54b7e1a4 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -75,6 +75,9 @@ public: void setValue(const Base::Vector3d &vec); void setValue(double x, double y, double z); + /// Get valid paths for this property; used by auto completer + void getPaths(std::vector &paths) const; + /** This method returns a string representation of the property */ const Base::Vector3d &getValue(void) const;