From 14bf380e03c8e645b61cb8e561f5b4e878c21e66 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 14 Mar 2018 17:20:03 +0100 Subject: [PATCH] support to handle changed types when reading dynamic properties --- src/App/DynamicProperty.cpp | 10 ++++++---- src/App/PropertyContainer.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/App/DynamicProperty.cpp b/src/App/DynamicProperty.cpp index 75c427f916..343ae84f63 100644 --- a/src/App/DynamicProperty.cpp +++ b/src/App/DynamicProperty.cpp @@ -437,12 +437,14 @@ void DynamicProperty::Restore(Base::XMLReader &reader) #endif } else if (prop) { - Base::Console().Warning("%s: Overread data for property %s of type %s, expected type is %s\n", - pc->getTypeId().getName(), prop->getName(), prop->getTypeId().getName(), TypeName); + //Base::Console().Warning("%s: Overread data for property %s of type %s, expected type is %s\n", + // pc->getTypeId().getName(), prop->getName(), prop->getTypeId().getName(), TypeName); + pc->handleChangedPropertyType(reader, TypeName, prop); } else { - Base::Console().Warning("%s: No property found with name %s and type %s\n", - pc->getTypeId().getName(), PropName, TypeName); + //Base::Console().Warning("%s: No property found with name %s and type %s\n", + // pc->getTypeId().getName(), PropName, TypeName); + pc->handleChangedPropertyName(reader, TypeName, PropName); } } reader.readEndElement("Property"); diff --git a/src/App/PropertyContainer.h b/src/App/PropertyContainer.h index bbd716bfd8..d767af08a8 100644 --- a/src/App/PropertyContainer.h +++ b/src/App/PropertyContainer.h @@ -36,6 +36,7 @@ namespace App { class Property; class PropertyContainer; +class DynamicProperty; class DocumentObject; class Extension; @@ -184,6 +185,7 @@ public: friend class Property; + friend class DynamicProperty; protected: