From 8a7c4b079851fff6986a1710d9d6ee3f93d73047 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Mon, 4 Oct 2021 01:10:38 +0200 Subject: WTrackMenu: fetch the Track Properties shortcut from util/defs.h --- src/widget/wtrackmenu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index cf7e0993a7..21604a3969 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -26,6 +26,7 @@ #include "preferences/colorpalettesettings.h" #include "sources/soundsourceproxy.h" #include "track/track.h" +#include "util/defs.h" #include "util/desktophelper.h" #include "util/parented_ptr.h" #include "util/qt.h" @@ -211,6 +212,13 @@ void WTrackMenu::createActions() { if (featureIsEnabled(Feature::Properties)) { m_pPropertiesAct = new QAction(tr("Properties"), this); + // This is just for having the shortcut displayed next to the action + // when the menu is invoked from the tracks table. + // The keypress is caught in WTrackTableView::keyPressEvent + if (m_pTrackModel) { + m_pPropertiesAct->setShortcut( + QKeySequence(kPropertiesShortcutModifier + kPropertiesShortcutKey)); + } connect(m_pPropertiesAct, &QAction::triggered, this, &WTrackMenu::slotShowDlgTrackInfo); } -- cgit v1.2.3