Helper function to get preferred delete key depending on platform
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/Selection/Selection.h>
|
||||
#include <Gui/Tools.h>
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Mod/Fem/App/FemConstraint.h>
|
||||
|
||||
@@ -192,11 +193,7 @@ void TaskFemConstraint::createDeleteAction(QListWidget* parentList)
|
||||
// creates a context menu, a shortcut for it and connects it to a slot function
|
||||
|
||||
deleteAction = new QAction(tr("Delete"), this);
|
||||
{
|
||||
auto& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
auto shortcut = rcCmdMgr.getCommandByName("Std_Delete")->getShortcut();
|
||||
deleteAction->setShortcut(QKeySequence(shortcut));
|
||||
}
|
||||
deleteAction->setShortcut(Gui::QtTools::deleteKeySequence());
|
||||
|
||||
// display shortcut behind the context menu entry
|
||||
deleteAction->setShortcutVisibleInContextMenu(true);
|
||||
|
||||
Reference in New Issue
Block a user