From 0a2d8dc5ca7f5c30340919f57b2a04b1d313ad94 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 17 Aug 2019 11:49:46 +0800 Subject: [PATCH] App: do not throw on recursive recompute --- src/App/Document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 4bee1a70d3..748b7e8c5d 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -3035,7 +3035,6 @@ int Document::recompute(const std::vector &objs, bool forc int Document::recompute(const std::vector &objs, bool force, bool *hasError, int options) { int objectCount = 0; - if (testStatus(Document::PartialDoc)) { if(mustExecute()) FC_WARN("Please reload partial document '" << Label.getValue() << "' for recomputation."); @@ -3043,7 +3042,8 @@ int Document::recompute(const std::vector &objs, bool forc } if (testStatus(Document::Recomputing)) { // this is clearly a bug in the calling instance - throw Base::RuntimeError("Nested recomputes of a document are not allowed"); + FC_ERR("Recusrive calling of recomput for dcument " << getName()); + return 0; } // The 'SkipRecompute' flag can be (tmp.) set to avoid too many // time expensive recomputes