MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / copyTo

Method copyTo

src/App/PropertyLinks.cpp:4443–4470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4441}
4442
4443void PropertyXLink::copyTo(PropertyXLink& other,
4444 DocumentObject* linked,
4445 std::vector<std::string>* subs) const
4446{
4447 if (!linked) {
4448 linked = _pcLink;
4449 }
4450 if (linked && linked->isAttachedToDocument()) {
4451 other.docName = linked->getDocument()->getName();
4452 other.objectName = linked->getNameInDocument();
4453 other.docInfo.reset();
4454 other.filePath.clear();
4455 }
4456 else {
4457 other.objectName = objectName;
4458 other.docName.clear();
4459 other.docInfo = docInfo;
4460 other.filePath = filePath;
4461 }
4462 if (subs) {
4463 other._SubList = std::move(*subs);
4464 }
4465 else {
4466 other._SubList = _SubList;
4467 other._ShadowSubList = _ShadowSubList;
4468 }
4469 other._Flags = _Flags;
4470}
4471
4472Property* PropertyXLink::Copy() const
4473{

Callers 7

CopyOnImportExternalMethod · 0.45
CopyOnLabelChangeMethod · 0.45
CopyOnLinkReplaceMethod · 0.45
CopyMethod · 0.45
setValueMethod · 0.45
CopyMethod · 0.45
PasteMethod · 0.45

Calls 7

moveFunction · 0.50
isAttachedToDocumentMethod · 0.45
getNameMethod · 0.45
getDocumentMethod · 0.45
getNameInDocumentMethod · 0.45
resetMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected