Helper function to get preferred delete key depending on platform
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/Selection/Selection.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Tools.h>
|
||||
#include <Mod/PartDesign/App/Body.h>
|
||||
#include <Mod/PartDesign/App/FeatureAddSub.h>
|
||||
#include <Mod/PartDesign/App/FeatureTransformed.h>
|
||||
@@ -102,11 +103,8 @@ void TaskTransformedParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
auto action = new QAction(tr("Remove"), this);
|
||||
{
|
||||
auto& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
auto shortcut = rcCmdMgr.getCommandByName("Std_Delete")->getShortcut();
|
||||
action->setShortcut(QKeySequence(shortcut));
|
||||
}
|
||||
action->setShortcut(Gui::QtTools::deleteKeySequence());
|
||||
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
|
||||
Reference in New Issue
Block a user