App: fix Link document restore

This fixes issue #0004224
This commit is contained in:
Zheng, Lei
2019-12-14 11:55:52 +08:00
committed by wmayer
parent 47f16467db
commit 51cf93012f
3 changed files with 15 additions and 0 deletions

View File

@@ -2641,6 +2641,13 @@ public:
}
}
static void restoreDocument(const App::Document &doc) {
auto it = _DocInfoMap.find(getFullPath(doc.FileName.getValue()));
if(it==_DocInfoMap.end())
return;
it->second->slotFinishRestoreDocument(doc);
}
void slotFinishRestoreDocument(const App::Document &doc) {
if(pcDoc) return;
QString fullpath(getFullPath());
@@ -3423,6 +3430,10 @@ bool PropertyXLink::hasXLink(
return ret;
}
void PropertyXLink::restoreDocument(const App::Document &doc) {
DocInfo::restoreDocument(doc);
}
std::map<App::Document*,std::set<App::Document*> >
PropertyXLink::getDocumentOutList(App::Document *doc) {
std::map<App::Document*,std::set<App::Document*> > ret;