From: nds Date: Mon, 8 Dec 2014 09:44:41 +0000 (+0300) Subject: It checks whether the new operation can be started and the previuos operation is... X-Git-Tag: V_0.6.0^2~8^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e359f9da329fc287aa985e8936a79790173c1fb;p=modules%2Fshaper.git It checks whether the new operation can be started and the previuos operation is committed. --- diff --git a/src/ModuleBase/ModuleBase_IModule.cpp b/src/ModuleBase/ModuleBase_IModule.cpp index 4aa92c553..bd0c987e4 100644 --- a/src/ModuleBase/ModuleBase_IModule.cpp +++ b/src/ModuleBase/ModuleBase_IModule.cpp @@ -132,7 +132,11 @@ void ModuleBase_IModule::onFeatureTriggered() void ModuleBase_IModule::editFeature(FeaturePtr theFeature) { - ModuleBase_Operation* anOperation = createOperation(theFeature->getKind()); + std::string aFeatureId = theFeature->getKind(); + if (!myWorkshop->canStartOperation(aFeatureId.c_str())) + return; + + ModuleBase_Operation* anOperation = createOperation(aFeatureId); anOperation->setFeature(theFeature); sendOperation(anOperation); } \ No newline at end of file