From 455b646854aaa21f79accb71dfbcff931359a52c Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 30 May 2017 14:16:29 +0200 Subject: [PATCH] set Restore flag also for copy&paste operation --- src/App/Document.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 00d51b86ea..753db48e9e 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -1214,9 +1214,9 @@ void Document::Restore(Base::XMLReader &reader) // read the feature types readObjects(reader); - // tip object handling. First the whole document has to be read, then we - // can restore the Tip link out of the TipName Property: - Tip.setValue(getObject(TipName.getValue())); + // tip object handling. First the whole document has to be read, then we + // can restore the Tip link out of the TipName Property: + Tip.setValue(getObject(TipName.getValue())); } reader.readEndElement("Document"); @@ -1344,6 +1344,7 @@ Document::readObjects(Base::XMLReader& reader) std::vector Document::importObjects(Base::XMLReader& reader) { + setStatus(Document::Restoring, true); reader.readElement("Document"); long scheme = reader.getAttributeAsInteger("SchemaVersion"); reader.DocumentSchema = scheme; @@ -1369,6 +1370,8 @@ Document::importObjects(Base::XMLReader& reader) (*it)->ExpressionEngine.onDocumentRestored(); (*it)->purgeTouched(); } + + setStatus(Document::Restoring, false); return objs; }