QList<ModuleBase_ViewerPrsPtr> aPreSelected =
aSelection->getSelected(ModuleBase_ISelection::AllControls);
+ ModuleBase_OperationFeature* aCurOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (myWorkshop->currentOperation());
+ QString anOperationKind = aCurOperation ? aCurOperation->getDescription()->operationId() : "";
+
+
bool isCommitted;
if (!myWorkshop->canStartOperation(theCmdId, isCommitted))
return;
if (aMessage.get()) {
setReentrantPreSelection(aMessage);
}
- else
+ else if (anOperationKind == theCmdId) // restore of selection only if the kind is the same
aFOperation->initSelection(aPreSelected);
workshop()->processLaunchOperation(aFOperation);