diff options
author | ronso0 <ronso0@mixxx.org> | 2021-10-04 01:10:38 +0200 |
---|---|---|
committer | ronso0 <ronso0@mixxx.org> | 2021-10-04 02:39:23 +0200 |
commit | 8a7c4b079851fff6986a1710d9d6ee3f93d73047 (patch) | |
tree | 197c02797999eebbb0332efb997b92b9c7a52534 /src | |
parent | dfe5d3d117a92d79c211793bc58bcc4fa374c64e (diff) |
WTrackMenu: fetch the Track Properties shortcut from util/defs.h
Diffstat (limited to 'src')
-rw-r--r-- | src/widget/wtrackmenu.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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); } |