Reuse Std_Delete shortcut instead of hardcoding Delete (#16682)
* Reuse Std_Delete shortcut in TaskBooleanParameters * Reuse Std_Delete shortcut in TaskDressUpParameters * Reuse Std_Delete shortcut in TaskLoftParameters * Reuse Std_Delete shortcut in TaskPipeParameters * Reuse Std_Delete shortcut in TaskSapeBinder * Reuse Std_Delete shortcut in TaskTransformedParameters * Reuse Std_Delete shortcut in TaskExtrudeParameters * Reuse Std_Delete shortcut in TaskSections * Reuse Std_Delete shortcut in MaterialSave * Reuse Std_Delete shortcut in Array2D * Reuse Std_Delete shortcut in TaskFemConstraint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -84,7 +84,11 @@ TaskBooleanParameters::TaskBooleanParameters(ViewProviderBoolean* BooleanView, Q
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QKeySequence::Delete);
|
||||
{
|
||||
auto& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
auto shortcut = rcCmdMgr.getCommandByName("Std_Delete")->getShortcut();
|
||||
action->setShortcut(QKeySequence(shortcut));
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
|
||||
Reference in New Issue
Block a user