expose recompute() of document object to Python

This commit is contained in:
wmayer
2016-11-19 16:24:11 +01:00
parent a16b143664
commit 2a145a12e1
5 changed files with 43 additions and 19 deletions

View File

@@ -71,23 +71,10 @@ DocumentObject::~DocumentObject(void)
}
}
namespace App {
class ObjectExecution
{
public:
ObjectExecution(DocumentObject* o) : obj(o)
{ obj->StatusBits.set(3); }
~ObjectExecution()
{ obj->StatusBits.reset(3); }
private:
DocumentObject* obj;
};
}
App::DocumentObjectExecReturn *DocumentObject::recompute(void)
{
// set/unset the execution bit
ObjectExecution exe(this);
ObjectStatusLocker exe(App::Recompute, this);
return this->execute();
}