From 75ee3e4c25c2fe94e07fe04752ec8ac6843cd860 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 23 Oct 2018 23:12:25 +0200 Subject: [PATCH] suppress error message if while restoring a document one of the lines or planes of an origin cannot be found --- src/Gui/ViewProviderOrigin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Gui/ViewProviderOrigin.cpp b/src/Gui/ViewProviderOrigin.cpp index 970927ffd2..7bce98c617 100644 --- a/src/Gui/ViewProviderOrigin.cpp +++ b/src/Gui/ViewProviderOrigin.cpp @@ -194,7 +194,11 @@ void ViewProviderOrigin::onChanged(const App::Property* prop) { if (vpLineZ) { vpLineZ->Size.setValue ( szZ ); } } catch (const Base::Exception &ex) { - Base::Console().Error ("%s\n", ex.what() ); + // While restoring a document don't report errors if one of the lines or planes + // cannot be found. + App::Document* doc = getObject()->getDocument(); + if (!doc->testStatus(App::Document::Restoring)) + Base::Console().Error ("%s\n", ex.what() ); } }