X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_OperationMgr.cpp;h=09aa5b6cacd286ba5bcea7c5735cefdd4b557026;hb=c837befca5d8a28a000ac1b87345f038d87b727f;hp=fc910e718ff2bbc099724dc1a036070bb5ffb9df;hpb=41518bd13fabffaf5ac2aeaf27f6716f57da355f;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index fc910e718..09aa5b6ca 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -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(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();