From 7b110e06d8aabae2aa3f7edd7da4e4321bb54d11 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Mon, 29 May 2017 09:06:10 +0200 Subject: [PATCH] App:Document new status bit to mark Restoring --- src/App/Document.cpp | 3 +++ src/App/Document.h | 1 + 2 files changed, 4 insertions(+) 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 */