From 74c912f169404af570ec3e721cea67f396385fa4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 2 May 2015 13:14:38 +0200 Subject: [PATCH] + fixes #0002064: Editable text changes in drawing template not restored. --- src/Mod/Drawing/App/FeaturePage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mod/Drawing/App/FeaturePage.cpp b/src/Mod/Drawing/App/FeaturePage.cpp index 85cef73c13..eb52cb9515 100644 --- a/src/Mod/Drawing/App/FeaturePage.cpp +++ b/src/Mod/Drawing/App/FeaturePage.cpp @@ -106,6 +106,9 @@ void FeaturePage::onChanged(const App::Property* prop) void FeaturePage::onDocumentRestored() { + // Needs to be tmp. set because otherwise the custom text gets overridden (#0002064) + this->StatusBits.set(4); // the 'Restore' flag + Base::FileInfo fi(PageResult.getValue()); std::string path = App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName(); // try to find the template in user dir/Templates first @@ -113,6 +116,8 @@ void FeaturePage::onDocumentRestored() if (tempfi.exists()) path = tempfi.filePath(); Template.setValue(path); + + this->StatusBits.reset(4); // the 'Restore' flag } App::DocumentObjectExecReturn *FeaturePage::execute(void)