App: fix external document loading

The problem happens when partial loading is enabled. If document A
contains a link to some object in document B, it will load B as partial
document with only that object and its necessary dependencies. But if
document A contains another link to some object in document C which also
has a link to some object in document B, the link in document C may not
be restored, because document B is partially loaded without the linked
object. This patch will check for this case and reload document B for
more objects.

See an example reported in
https://forum.freecadweb.org/viewtopic.php?p=495078#p495078
This commit is contained in:
Zheng, Lei
2021-08-02 11:38:01 +08:00
parent 414ea71a28
commit fc9d3547ad
7 changed files with 311 additions and 166 deletions

View File

@@ -1499,7 +1499,7 @@ void Document::slotFinishRestoreDocument(const App::Document& doc)
}
// reset modified flag
setModified(false);
setModified(doc.testStatus(App::Document::LinkStampChanged));
}
void Document::slotShowHidden(const App::Document& doc)