From bca24ac6b42e72c16c4596939d5eb3ae52b91d47 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sun, 24 Apr 2022 21:56:02 +0800 Subject: [PATCH] App: fix property conflict in App::Link restore The conflict happens if the App::Link has dynamic property having the same name as the linked object --- src/App/PropertyContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/PropertyContainer.cpp b/src/App/PropertyContainer.cpp index e66628eae9..97e6a4b539 100644 --- a/src/App/PropertyContainer.cpp +++ b/src/App/PropertyContainer.cpp @@ -341,7 +341,7 @@ void PropertyContainer::Restore(Base::XMLReader &reader) // type and the behaviour would be undefined. try { auto prop = getPropertyByName(PropName.c_str()); - if(!prop) + if(!prop || prop->getContainer() != this) prop = dynamicProps.restore(*this,PropName.c_str(),TypeName.c_str(),reader); decltype(Property::StatusBits) status;