diff --git a/src/library/playlisttablemodel.cpp b/src/library/playlisttablemodel.cpp index c8ce2dead4fa..441e70e0de14 100644 --- a/src/library/playlisttablemodel.cpp +++ b/src/library/playlisttablemodel.cpp @@ -343,6 +343,7 @@ TrackModel::Capabilities PlaylistTableModel::getCapabilities() const { Capability::LoadToSampler | Capability::LoadToPreviewDeck | Capability::ResetPlayed | + Capability::Hide | Capability::Analyze; if (m_iPlaylistId != diff --git a/src/library/trackset/crate/cratetablemodel.cpp b/src/library/trackset/crate/cratetablemodel.cpp index 43c5a6c59d77..4db462025f1e 100644 --- a/src/library/trackset/crate/cratetablemodel.cpp +++ b/src/library/trackset/crate/cratetablemodel.cpp @@ -131,6 +131,7 @@ TrackModel::Capabilities CrateTableModel::getCapabilities() const { Capability::LoadToPreviewDeck | Capability::RemoveCrate | Capability::ResetPlayed | + Capability::Hide | Capability::RemoveFromDisk | Capability::Analyze; diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index d6b861855394..9e4e57795db0 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -268,7 +268,10 @@ void WTrackMenu::createActions() { m_pHideAct = new QAction(tr("Hide from Library"), this); // This is just for having the shortcut displayed next to the action in the menu. // The actual keypress is handled in WTrackTableView::keyPressEvent(). - m_pHideAct->setShortcut(hideRemoveKeySequence); + // Note: don't show the hotkey for more than one action + if (!featureIsEnabled(Feature::Remove)) { + m_pHideAct->setShortcut(hideRemoveKeySequence); + } connect(m_pHideAct, &QAction::triggered, this, &WTrackMenu::slotHide); m_pUnhideAct = new QAction(tr("Unhide from Library"), this); diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 3fe112c55e8e..a25c35c4d9b5 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -856,14 +856,17 @@ void WTrackTableView::hideOrRemoveSelectedTracks() { } TrackModel::Capability cap; - if (pTrackModel->hasCapabilities(TrackModel::Capability::Hide)) { - cap = TrackModel::Capability::Hide; - } else if (pTrackModel->hasCapabilities(TrackModel::Capability::Remove)) { + // In the track menu the hotkey is shown for 'Remove ..' actions, or if there + // is no remove action, for 'Hide ..'. Hence, to match the hotkey, do Hide + // only if the track model doesn't support any Remove actions. + if (pTrackModel->hasCapabilities(TrackModel::Capability::Remove)) { cap = TrackModel::Capability::Remove; } else if (pTrackModel->hasCapabilities(TrackModel::Capability::RemoveCrate)) { cap = TrackModel::Capability::RemoveCrate; } else if (pTrackModel->hasCapabilities(TrackModel::Capability::RemovePlaylist)) { cap = TrackModel::Capability::RemovePlaylist; + } else if (pTrackModel->hasCapabilities(TrackModel::Capability::Hide)) { + cap = TrackModel::Capability::Hide; } else { return; }