From: nds Date: Wed, 20 May 2015 12:58:56 +0000 (+0300) Subject: A fix for the bug: it is possible to apply extrusion even if the algorithm is failed... X-Git-Tag: V_1.2.0~135^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5fa23443bcfd1271231762bd8c126dc88f0f794a;p=modules%2Fshaper.git A fix for the bug: it is possible to apply extrusion even if the algorithm is failed to build the result. Scenario: create a sketch, create a part, visualize all default planes, create extrusion, select a sketch, in "to" control select a perpendicular plane. An error message appears but "Apply" is enabled. This fix disables the "Apply" button. --- diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 17c2e936a..9e0de41e0 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -64,7 +64,7 @@ FeaturePtr ModuleBase_Operation::feature() const bool ModuleBase_Operation::isValid() const { - if (!myFeature) + if (!myFeature || !myFeature->data().get()) return true; // rename operation if (myFeature->isAction()) return true;