protect document against nested recomputes

+ convert ObjectStatusLocker into a template class to make its usage more flexible
+ add status flag 'Recomputing' and set in Document::recompute to detect and avoid nested calls of recompute
This commit is contained in:
wmayer
2017-07-17 18:24:10 +02:00
parent d3f5ace928
commit 033242ead8
6 changed files with 26 additions and 11 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ DocumentObject::~DocumentObject(void)
App::DocumentObjectExecReturn *DocumentObject::recompute(void)
{
// set/unset the execution bit
ObjectStatusLocker exe(App::Recompute, this);
ObjectStatusLocker<ObjectStatus, DocumentObject> exe(App::Recompute, this);
return this->execute();
}