Helper function to get preferred delete key depending on platform
This commit is contained in:
@@ -305,11 +305,8 @@ void TaskDressUpParameters::createDeleteAction(QListWidget* parentList)
|
||||
// creates a context menu, a shortcut for it and connects it to a slot function
|
||||
|
||||
deleteAction = new QAction(tr("Remove"), 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);
|
||||
parentList->addAction(deleteAction);
|
||||
|
||||
Reference in New Issue
Block a user