- //Get operation Id and feature to validate
- QString anOperationId = theOperation->id();
- FeaturePtr aFeature = theOperation->feature();
- //Get validators for the Id
- PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
- ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+ if (hasOperation())
+ currentOperation()->postpone();
+ myOperations.append(theOperation);
+
+ connect(theOperation, SIGNAL(started()), SLOT(onOperationStarted()));
+ connect(theOperation, SIGNAL(aborted()), SLOT(onOperationAborted()));
+ connect(theOperation, SIGNAL(committed()), SLOT(onOperationCommitted()));
+ connect(theOperation, SIGNAL(stopped()), SLOT(onOperationStopped()));
+ connect(theOperation, SIGNAL(resumed()), SLOT(onOperationResumed()));
+ connect(theOperation, SIGNAL(activatedByPreselection()),
+ SIGNAL(operationActivatedByPreselection()));
+
+ theOperation->start();
+ onValidateOperation();
+ return true;
+}