Salome HOME
History menu: improvments and bugfixes
[modules/shaper.git] / src / XGUI / XGUI_ActionsMgr.cpp
index c3613d22b9a9eab202a4cdd7f00502afac90f377..0798bbc4809bb11e9c0a8fb59e9eea9949c8ae26 100644 (file)
@@ -228,9 +228,13 @@ QAction* XGUI_ActionsMgr::operationStateAction(OperationStateActionId theId, QOb
         aResult = new QAction(QIcon(":pictures/button_ok.png"), "", theParent);
         break;
       case Abort:
-      case AbortAll:
+      case AbortAll: {
         aResult = new QAction(QIcon(":pictures/button_cancel.png"), "", theParent);
-        break;
+        if(theId == Abort) {
+          aResult->setShortcut(QKeySequence(Qt::Key_Escape));
+        }
+      }
+      break;
       case Help:
         aResult = new QAction(QIcon(":pictures/button_help.png"), "", theParent);
         break;
@@ -242,6 +246,18 @@ QAction* XGUI_ActionsMgr::operationStateAction(OperationStateActionId theId, QOb
   return aResult;
 }
 
+ActionInfo XGUI_ActionsMgr::actionInfoById(const QString& theId)
+{
+  ActionInfo aResult;
+  if(myActions.contains(theId)) {
+    aResult.initFrom(myActions.value(theId));
+  } else {
+   aResult.id = theId;
+   aResult.text = theId;
+  }
+  return aResult;
+}
+
 void XGUI_ActionsMgr::setAllEnabled(bool isEnabled)
 {
   foreach(QString eachAction, myActions.keys())