+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
// File: XGUI_OperationMgr.h
// Created: 20 Apr 2014
// Author: Natalia ERMOLAEVA
#include <QKeyEvent>
XGUI_OperationMgr::XGUI_OperationMgr(QObject* theParent)
- : QObject(theParent)
+ : QObject(theParent), myIsValidationLock(false)
{
}
connect(theOperation, SIGNAL(started()), SLOT(onOperationStarted()));
connect(theOperation, SIGNAL(aborted()), SLOT(onOperationAborted()));
- connect(theOperation, SIGNAL(committed()), SLOT(onOperationComitted()));
+ 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();
if (!hasOperation())
return;
ModuleBase_Operation* anOperation = currentOperation();
- if(anOperation) {
+ if(anOperation && (!myIsValidationLock)) {
bool isValid = anOperation->isValid();
emit operationValidated(isValid);
}
emit operationAborted(aSenderOperation);
}
-void XGUI_OperationMgr::onOperationComitted()
+void XGUI_OperationMgr::onOperationCommitted()
{
ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
- emit operationComitted(aSenderOperation);
+ emit operationCommitted(aSenderOperation);
}
void XGUI_OperationMgr::onOperationResumed()
switch (theEvent->key()) {
case Qt::Key_Return:
case Qt::Key_Enter: {
+ emit keyEnterReleased();
commitOperation();
}
break;