Salome HOME
bos #29479 Show edges directions
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.cpp
index fc910e718ff2bbc099724dc1a036070bb5ffb9df..09aa5b6cacd286ba5bcea7c5735cefdd4b557026 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -107,6 +107,7 @@ bool XGUI_ShortCutListener::eventFilter(QObject *theObject, QEvent *theEvent)
             break;
           case Qt::Key_F2:
             myOperationMgr->xworkshop()->objectBrowser()->onEditItem();
+            isAccepted = true;
             break;
           default:
             isAccepted = myOperationMgr->onKeyReleased(theObject, aKeyEvent);
@@ -361,7 +362,7 @@ bool XGUI_OperationMgr::canStopOperation(ModuleBase_Operation* theOperation,
   if (theOperation && theOperation->isModified()) {
     ModuleBase_OperationFeature* aOp = dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
     std::string aContext;
-    if (aOp)
+    if (aOp && aOp->feature())
       aContext = aOp->feature()->getKind();
     QString aTitle = Config_Translator::translate(aContext,
       theOperation->getDescription()->description().toStdString()).c_str();