Create sketch with a closed contour. Edit sketch, move contour by point. Apply is disabled until the second move.
}
// the modified state of the current operation should be updated if there are features, which
// were changed here
- if (isModified)
+ if (isModified) {
aCurrentOperation->onValuesChanged();
+ ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
+ XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(anIWorkshop);
+ XGUI_Workshop* aWorkshop = aConnector->workshop();
+ aWorkshop->updateCompositeActionState();
+ }
Events_Loop::loop()->flush(aMoveEvent); // up all move events - to be processed in the solver
//Events_Loop::loop()->flush(aUpdateEvent); // up update events - to redisplay presentations
// e.g. sketch can be applyed only if at least one nested element create is finished
bool aCanUndo = ModelAPI_Session::get()->canUndo();
bool aParentValid = operationMgr()->isParentOperationValid();
+ bool aCurrentValid = operationMgr()->currentOperation() &&
+ operationMgr()->currentOperation()->isValid();
QAction* aAcceptAllAct = myActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
- aAcceptAllAct->setEnabled(aParentValid && aCanUndo);
+ aAcceptAllAct->setEnabled(aParentValid && (aCanUndo || aCurrentValid));
}
void XGUI_Workshop::updateHistory()