App: fix PropertyXLink file path update

This commit is contained in:
Zheng, Lei
2019-09-26 12:50:26 +08:00
committed by wmayer
parent fbfad66d2b
commit 3de3f696e3

View File

@@ -2934,6 +2934,10 @@ void PropertyXLink::setValue(App::DocumentObject *lValue,
unlink();
docInfo = info;
}
if(docInfo)
filePath = docInfo->filePath();
else
filePath.clear();
_pcLink=lValue;
if(docInfo && docInfo->pcDoc)
stamp=docInfo->pcDoc->LastModifiedDate.getValue();
@@ -2977,6 +2981,10 @@ void PropertyXLink::setValue(std::string &&filename, std::string &&name,
unlink();
docInfo = info;
}
if(docInfo)
filePath = docInfo->filePath();
else
filePath.clear();
if(docInfo && docInfo->pcDoc)
stamp=docInfo->pcDoc->LastModifiedDate.getValue();
objectName = std::move(name);