From 516a005ced81e59c0b87d2b44c5772f1f4fa6e12 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 1 Jun 2020 16:11:14 +0800 Subject: [PATCH] App: fix PropertyXLinkList/SubList::getValues() --- src/App/PropertyLinks.cpp | 15 +++++++-------- src/App/PropertyLinks.h | 5 +---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index c49afd62fb..9bf02712b7 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -4303,6 +4303,13 @@ void PropertyXLinkSubList::aboutToSetChildValue(Property &) { } } +std::vector PropertyXLinkSubList::getValues(void) const +{ + std::vector xLinks; + getLinks(xLinks); + return(xLinks); +} + //************************************************************************** // PropertyXLinkList //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -4354,14 +4361,6 @@ void PropertyXLinkList::setPyObject(PyObject *value) PropertyXLinkSubList::setPyObject(value); } -//for consistency with PropertyLinkList -const std::vector PropertyXLinkList::getValues(void) const -{ - std::vector xLinks; - getLinks(xLinks); - return(xLinks); -} - //************************************************************************** // PropertyXLinkContainer //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/App/PropertyLinks.h b/src/App/PropertyLinks.h index 183cfcbfba..cec3a2d488 100644 --- a/src/App/PropertyLinks.h +++ b/src/App/PropertyLinks.h @@ -1222,7 +1222,7 @@ public: */ void setValue(App::DocumentObject *lValue, const std::vector &SubList={}); - std::vector getValues(void); + std::vector getValues(void) const; const std::string getPyReprString() const; @@ -1309,9 +1309,6 @@ public: virtual PyObject *getPyObject(void) override; virtual void setPyObject(PyObject *) override; - - //for consistency with PropertyLinkList - const std::vector getValues(void) const; };