| 1680 | } |
| 1681 | |
| 1682 | bool 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 | |
| 1710 | std::string DocumentObject::getElementMapVersion(const App::Property* _prop, bool restored) const |
| 1711 | { |
no test coverage detected