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; }