X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_OperationMgr.cpp;h=5db1d07a7f8f405993ff2c7fca3df30d2eea37fc;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=09aa5b6cacd286ba5bcea7c5735cefdd4b557026;hpb=88ee9b2b81cf93a6324336b57e30cc8a3a487499;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index 09aa5b6ca..5db1d07a7 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2022 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -29,6 +29,8 @@ #include "XGUI_Tools.h" #include "XGUI_ObjectsBrowser.h" #include "XGUI_ContextMenuMgr.h" +#include "XGUI_Selection.h" +#include "XGUI_SelectionMgr.h" #include #include @@ -106,9 +108,16 @@ bool XGUI_ShortCutListener::eventFilter(QObject *theObject, QEvent *theEvent) isAccepted = myOperationMgr->onProcessDelete(theObject); break; case Qt::Key_F2: - myOperationMgr->xworkshop()->objectBrowser()->onEditItem(); + { + QObjectPtrList anObjects = myOperationMgr->xworkshop()->selector()->selection()->selectedObjects(); + if (myOperationMgr->xworkshop()->abortAllOperations()) + { + myOperationMgr->xworkshop()->objectBrowser()->setObjectsSelected(anObjects); + myOperationMgr->xworkshop()->objectBrowser()->onEditItem(); + } isAccepted = true; break; + } default: isAccepted = myOperationMgr->onKeyReleased(theObject, aKeyEvent); break;