App/Gui: New restoreError Document status and Gui pop-up

========================================================

If the restore of Document.xml results in invalid Document.xml (because unhandled exceptions occurred), the
document status Document::restoreError is set. The GUI or Mod/Web if a link was clicked, show a pop-up indicating
this situation.

This commit also shows an appropriate pop-up for the partialRestore when opening from the menu, that before only
appeared when opening by clicking a link.
This commit is contained in:
Abdullah Tahiri
2021-01-18 16:16:46 +01:00
committed by abdullahtahiriyo
parent e2c4d5f86e
commit 05ccc95cde
4 changed files with 13 additions and 0 deletions

View File

@@ -2745,6 +2745,7 @@ void Document::restore (const char *filename,
}
catch (const Base::Exception& e) {
Base::Console().Error("Invalid Document.xml: %s\n", e.what());
setStatus(Document::RestoreError, true);
}
d->partialLoadObjects.clear();