return isValid();
}
-void ModuleBase_Operation::start()
+bool ModuleBase_Operation::start()
{
myIsModified = false;
startOperation();
emit started();
+
+ return true;
}
void ModuleBase_Operation::postpone()
/// to change behavior of operation. There is no point in using this method. It would
/// be better to inherit own operator from base one and redefine startOperation method
/// instead.
- virtual void start();
+ /// \return true if the start is successful
+ virtual bool start();
/// Deactivates current operation which can be resumed later.
virtual void postpone();
return myVisualizedObjects.find(theObject) != myVisualizedObjects.end();
}
-void ModuleBase_OperationFeature::start()
+bool ModuleBase_OperationFeature::start()
{
setIsModified(false);
QString anId = getDescription()->operationId();
// in order to update commands status in the workshop, to be exact the feature action
// to be unchecked
abort();
- return;
+ return false;
}
}
//Already called startOperation();
emit started();
-
+ return true;
}
void ModuleBase_OperationFeature::abort()
/// to change behavior of operation. There is no point in using this method. It would
/// be better to inherit own operator from base one and redefine startOperation method
/// instead.
- void start();
+ /// \return true if the start is successful
+ virtual bool start();
/// Aborts operation
/// Public slot. Aborts operation. This slot is not virtual and cannot be redefined.
connect(aFOperation, SIGNAL(activatedByPreselection()),
SIGNAL(operationActivatedByPreselection()));
- theOperation->start();
- onValidateOperation();
- return true;
+ bool isStarted = theOperation->start();
+ if (isStarted)
+ onValidateOperation();
+ return isStarted;
}
bool XGUI_OperationMgr::abortAllOperations()