]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_IModule.cpp
Salome HOME
Issue #2123: Unexpected Sketcher behavior when creating Coincidence
[modules/shaper.git] / src / ModuleBase / ModuleBase_IModule.cpp
index ca6c1b1bc234dec3a25fd0bdcfc333319b33c24e..ad7eb2eddec5c9d13fc19560e78c13aedc2bab2f 100644 (file)
@@ -90,7 +90,6 @@ void ModuleBase_IModule::launchOperation(const QString& theCmdId,
                                                          (myWorkshop->currentOperation());
   QString anOperationKind = aCurOperation ? aCurOperation->getDescription()->operationId() : "";
 
-
   bool isCommitted;
   if (!myWorkshop->canStartOperation(theCmdId, isCommitted))
     return;
@@ -106,9 +105,10 @@ void ModuleBase_IModule::launchOperation(const QString& theCmdId,
     if (aMessage.get()) {
       setReentrantPreSelection(aMessage);
     }
-    else if (anOperationKind == theCmdId) // restore of selection only if the kind is the same
+    else if (anOperationKind.isEmpty() || anOperationKind == theCmdId) {
+      // restore of previous opeation is absent or new launched operation has the same kind
       aFOperation->initSelection(aPreSelected);
-
+    }
     workshop()->processLaunchOperation(aFOperation);
 
     if (aFOperation) {