From ad1cac3867dfb26d45764463eb7a444f535b4b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Tue, 8 Nov 2016 20:31:15 +0100 Subject: [PATCH] Fix PythonFeature Group persistance --- src/App/DynamicProperty.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/App/DynamicProperty.cpp b/src/App/DynamicProperty.cpp index a58b411d4..db6aa7042 100644 --- a/src/App/DynamicProperty.cpp +++ b/src/App/DynamicProperty.cpp @@ -52,7 +52,11 @@ DynamicProperty::~DynamicProperty() void DynamicProperty::getPropertyList(std::vector &List) const { // get the properties of the base class first and insert the dynamic properties afterwards - this->pc->PropertyContainer::getPropertyList(List); + if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId())) + return static_cast(this->pc)->ExtensionContainer::getPropertyList(List); + else + this->pc->PropertyContainer::getPropertyList(List); + for (std::map::const_iterator it = props.begin(); it != props.end(); ++it) List.push_back(it->second.property); } @@ -60,7 +64,11 @@ void DynamicProperty::getPropertyList(std::vector &List) const void DynamicProperty::getPropertyMap(std::map &Map) const { // get the properties of the base class first and insert the dynamic properties afterwards - this->pc->PropertyContainer::getPropertyMap(Map); + if(this->pc->isDerivedFrom(App::ExtensionContainer::getClassTypeId())) + return static_cast(this->pc)->ExtensionContainer::getPropertyMap(Map); + else + this->pc->PropertyContainer::getPropertyMap(Map); + for (std::map::const_iterator it = props.begin(); it != props.end(); ++it) Map[it->first] = it->second.property; }