Skip to content

Commit

Permalink
Track menu: show 'Load To' menus only for single tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Sep 26, 2024
1 parent 7cbc4bd commit 0edd51a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/widget/wtrackmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,10 +847,11 @@ void WTrackMenu::updateMenus() {
}

if (featureIsEnabled(Feature::LoadTo)) {
// Enable menus only for single track
int iNumDecks = static_cast<int>(m_pNumDecks.get());
m_pDeckMenu->clear();
// TODO Only enable for single track?
if (iNumDecks > 0) {
m_pDeckMenu->setEnabled(singleTrackSelected);
if (singleTrackSelected && iNumDecks > 0) {
for (int i = 1; i <= iNumDecks; ++i) {
// PlayerManager::groupForDeck is 0-indexed.
QString deckGroup = PlayerManager::groupForDeck(i - 1);
Expand Down Expand Up @@ -885,8 +886,9 @@ void WTrackMenu::updateMenus() {

int iNumSamplers = static_cast<int>(m_pNumSamplers.get());
const int maxSamplersPerMenu = 16;
if (iNumSamplers > 0) {
m_pSamplerMenu->clear();
m_pSamplerMenu->clear();
m_pSamplerMenu->setEnabled(singleTrackSelected);
if (singleTrackSelected && iNumSamplers > 0) {
QMenu* pMenu = m_pSamplerMenu;
int samplersInMenu = 0;
for (int i = 1; i <= iNumSamplers; ++i) {
Expand Down

0 comments on commit 0edd51a

Please sign in to comment.