]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
It checks whether the new operation can be started and the previuos operation is...
authornds <natalia.donis@opencascade.com>
Mon, 8 Dec 2014 09:44:41 +0000 (12:44 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 8 Dec 2014 09:44:41 +0000 (12:44 +0300)
src/ModuleBase/ModuleBase_IModule.cpp

index 4aa92c55381718720efd46df55f3a1cacac31ac0..bd0c987e47aa2f04572fed3f8f7da6678408633b 100644 (file)
@@ -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