Salome HOME
registerNotObligatory is not necessary if this property is set in XML.
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationFeature.cpp
index 0471bfae79e26b601075e030af60a165015df91b..950a20efa66a48108f84326212c7ac4af5920d19 100755 (executable)
@@ -49,11 +49,16 @@ ModuleBase_OperationFeature::~ModuleBase_OperationFeature()
   clearPreselection();
 }
 
-void ModuleBase_OperationFeature::setEditOperation(const bool theRestartTransaction)
+void ModuleBase_OperationFeature::setEditOperation(const bool& isEditState
+                                                   /*const bool theRestartTransaction*/)
 {
-  if (isEditOperation())
+  bool isCurrentEditState = isEditOperation();
+  if (isCurrentEditState == isEditState)
     return;
 
+  /*
+  // this case is obsolete as it was not approved for reentrant sketch operation
+  // it was implemented when isEditState did not exist and only edit operation can be set
   if (theRestartTransaction) {
     // finsh previous create operation
     emit beforeCommitted();
@@ -68,9 +73,8 @@ void ModuleBase_OperationFeature::setEditOperation(const bool theRestartTransact
     }
     ModelAPI_Session::get()->startOperation(anId.toStdString());
     emit beforeStarted();
-  }
-  else
-    myIsEditing = true;
+  } else*/
+  myIsEditing = isEditState;
 
   propertyPanel()->setEditingMode(isEditOperation());
 }