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

Method adjustRelativeLinks

src/App/DocumentObject.cpp:1682–1708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1680}
1681
1682bool DocumentObject::adjustRelativeLinks(const std::set<App::DocumentObject*>& inList,
1683 std::set<App::DocumentObject*>* visited)
1684{
1685 if (visited) {
1686 visited->insert(this);
1687 }
1688
1689 bool touched = false;
1690 std::vector<Property*> props;
1691 getPropertyList(props);
1692 for (auto prop : props) {
1693 auto linkProp = freecad_cast<PropertyLinkBase*>(prop);
1694 if (linkProp && linkProp->adjustLink(inList)) {
1695 touched = true;
1696 }
1697 }
1698 if (visited) {
1699 for (auto obj : getOutList()) {
1700 if (!visited->count(obj)) {
1701 if (obj->adjustRelativeLinks(inList, visited)) {
1702 touched = true;
1703 }
1704 }
1705 }
1706 }
1707 return touched;
1708}
1709
1710std::string DocumentObject::getElementMapVersion(const App::Property* _prop, bool restored) const
1711{

Callers 2

dropInObjectMethod · 0.45
exportFunction · 0.45

Calls 4

getOutListFunction · 0.85
insertMethod · 0.45
adjustLinkMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected