Skip to content

Commit

Permalink
App: do not throw on recursive recompute
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder authored and wwmayer committed Aug 17, 2019
1 parent dd8c4d8 commit 0a2d8dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3035,15 +3035,15 @@ int Document::recompute(const std::vector<App::DocumentObject*> &objs, bool forc
int Document::recompute(const std::vector<App::DocumentObject*> &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.");
return 0;
}
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
Expand Down

0 comments on commit 0a2d8dc

Please sign in to comment.