#4176 Enable Del keyboard shortcut for delete commands

This commit is contained in:
Gaute Lindkvist
2019-03-27 10:28:37 +01:00
parent f066829a0f
commit 9306961df4
16 changed files with 44 additions and 1 deletions

View File

@@ -75,6 +75,17 @@ void RicWellPathDeleteFeature::onActionTriggered(bool isChecked)
//--------------------------------------------------------------------------------------------------
void RicWellPathDeleteFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Delete Well Path(s)");
std::vector<RimWellPath*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() > 1u)
{
actionToSetup->setText("Delete Well Paths");
}
else
{
actionToSetup->setText("Delete Well Path");
}
actionToSetup->setIcon(QIcon(":/Erase.png"));
actionToSetup->setShortcut(QKeySequence::Delete);
actionToSetup->setShortcutVisibleInContextMenu(true);
}