* the operation is not granted.
* The method has to be redefined for granted operations.
*/
- virtual bool isGranted() const { return false; }
+ virtual bool isGranted(ModuleBase_IOperation* theOperation) const { return false; }
/**
* Must return True if the operation's feature is valid.
}
-bool PartSet_OperationSketch::isValid(ModuleBase_IOperation* theOperation) const
+bool PartSet_OperationSketch::isGranted(ModuleBase_IOperation* theOperation) const
{
PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(theOperation);
return aPreviewOp != NULL;
virtual ~PartSet_OperationSketch();
/// Returns True if the given operation is a Sketcher operation
- virtual bool isValid(ModuleBase_IOperation* theOperation) const;
+ virtual bool isGranted(ModuleBase_IOperation* theOperation) const;
/// Returns the operation local selection mode
bool XGUI_OperationMgr::canStartOperation(ModuleBase_Operation* theOperation)
{
- return true;
- /*bool aCanStart = true;
+ bool aCanStart = true;
ModuleBase_Operation* aCurrentOp = currentOperation();
if (aCurrentOp) {
- if (!theOperation->isGranted()) {
+ if (!aCurrentOp->isGranted(theOperation)) {
if (canAbortOperation()) {
aCurrentOp->abort();
} else {
}
}
}
- return aCanStart;*/
+ return aCanStart;
}