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
This commit is contained in:
Zheng, Lei
2022-04-24 21:56:02 +08:00
committed by Uwe
parent 3b85533438
commit bca24ac6b4

View File

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