diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index 0b5975f330..0d83902543 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -113,7 +113,12 @@ App::DocumentObjectExecReturn *DocumentObject::recompute(void) DocumentObjectExecReturn *DocumentObject::execute(void) { - //call all extensions + return executeExtensions(); +} + +App::DocumentObjectExecReturn* DocumentObject::executeExtensions() +{ + //execute extensions but stop on error auto vector = getExtensionsDerivedFromType(); for(auto ext : vector) { auto ret = ext->extensionExecute(); diff --git a/src/App/DocumentObject.h b/src/App/DocumentObject.h index ae50454fc6..8b599356e7 100644 --- a/src/App/DocumentObject.h +++ b/src/App/DocumentObject.h @@ -567,6 +567,11 @@ protected: */ virtual App::DocumentObjectExecReturn *execute(void); + /** + * Executes the extensions of a document object. + */ + App::DocumentObjectExecReturn *executeExtensions(); + /** Status bits of the document object * The first 8 bits are used for the base system the rest can be used in * descendent classes to mark special statuses on the objects.