connect(aFOperation, SIGNAL(activatedByPreselection()),
SIGNAL(operationActivatedByPreselection()));
- theOperation->start();
- onValidateOperation();
- return true;
+ bool isStarted = theOperation->start();
+ if (isStarted)
+ onValidateOperation();
+ return isStarted;
}
bool XGUI_OperationMgr::abortAllOperations()
return;
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
(currentOperation());
- if(aFOperation && aFOperation->feature().get())
- setApplyEnabled(myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty());
+ if(aFOperation && aFOperation->feature().get()) {
+ QString anError = myWorkshop->module()->getFeatureError(aFOperation->feature());
+ if (anError.isEmpty()) {
+ ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel();
+ if (aPanel) {
+ ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
+ if (anActiveWidget)
+ anError = myWorkshop->module()->getWidgetError(anActiveWidget);
+ }
+ }
+ setApplyEnabled(anError.isEmpty());
+ }
}
void XGUI_OperationMgr::setApplyEnabled(const bool theEnabled)
if (!aActiveWgt || !aActiveWgt->processEnter()) {
if (!myWorkshop->module()->processEnter(aActiveWgt ? aActiveWgt->attributeID() : "")) {
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
- if (!aFOperation || myWorkshop->module()->getFeatureError(aFOperation->feature(), false).isEmpty()) {
+ if (!aFOperation || myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) {
emit keyEnterReleased();
commitOperation();
}