aMgr->undo();
}
updateCompositeActionState();
-}
-
-//******************************************************
-void XGUI_Workshop::updateCompositeActionState()
-{
- // in order to apply is enabled only if there are modifications in the model
- // 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();
-
- QAction* aAcceptAllAct = myActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
- aAcceptAllAct->setEnabled(aParentValid && aCanUndo);
+ updateCommandStatus();
}
//******************************************************
for (int i = 0; i < theTimes; ++i) {
aMgr->redo();
}
+ updateCompositeActionState();
updateCommandStatus();
// unblock the viewer update functionality and make update on purpose
emit commandStatusUpdated();
}
+//******************************************************
+void XGUI_Workshop::updateCompositeActionState()
+{
+ // in order to apply is enabled only if there are modifications in the model
+ // 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();
+
+ QAction* aAcceptAllAct = myActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll);
+ aAcceptAllAct->setEnabled(aParentValid && aCanUndo);
+}
+
void XGUI_Workshop::updateHistory()
{
std::list<std::string> aUndoList = ModelAPI_Session::get()->undoList();
/// Update of commands status
void updateCommandStatus();
+ // Update enable state of accept all button. It is enabled if the the parent operation is
+ // valid and there are modifications in sesstion(undo can be performed).
+ void updateCompositeActionState();
+
/// update history list (undo/redo commands)
void updateHistory();
/// Rebuild data tree
void onRebuild();
- // Update enable state of accept all button. It is enabled if the the parent operation is
- // valid and there are modifications in sesstion(undo can be performed).
- void updateCompositeActionState();
-
/// Open preferences dialog box
void onPreferences();