diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 59b0c4276f..00d51b86ea 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -164,6 +164,7 @@ struct DocumentP undoing = false; StatusBits.set((size_t)Document::Closable, true); StatusBits.set((size_t)Document::KeepTrailingDigits, true); + StatusBits.set((size_t)Document::Restoring, false); iUndoMode = 0; UndoMemSize = 0; UndoMaxStackSize = 20; @@ -1573,6 +1574,7 @@ void Document::restore (void) throw Base::FileException("Error reading compression file",FileName.getValue()); GetApplication().signalStartRestoreDocument(*this); + setStatus(Document::Restoring, true); try { Document::Restore(reader); @@ -1602,6 +1604,7 @@ void Document::restore (void) } GetApplication().signalFinishRestoreDocument(*this); + setStatus(Document::Restoring, false); } bool Document::isSaved() const diff --git a/src/App/Document.h b/src/App/Document.h index 37aff37abf..d7427168ec 100644 --- a/src/App/Document.h +++ b/src/App/Document.h @@ -66,6 +66,7 @@ public: SkipRecompute = 0, KeepTrailingDigits = 1, Closable = 2, + Restoring = 3 }; /** @name Properties */