-// Copyright (C) 2014-2020 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
#include "XGUI_Tools.h"
#include "XGUI_ObjectsBrowser.h"
#include "XGUI_ContextMenuMgr.h"
+#include "XGUI_Selection.h"
+#include "XGUI_SelectionMgr.h"
#include <ModuleBase_IPropertyPanel.h>
#include <ModuleBase_ModelWidget.h>
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;
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();