Skip to content

Commit

Permalink
Pref Mixer: disable non-EQ combobox items if 'EQs only' is checked
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Jun 24, 2023
1 parent 96e7c8a commit de7810d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/preferences/dialog/dlgprefmixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <QButtonGroup>
#include <QHBoxLayout>
#include <QStandardItemModel>

#include "control/controlobject.h"
#include "control/controlproxy.h"
Expand Down Expand Up @@ -290,6 +291,10 @@ void DlgPrefMixer::slotNumDecksChanged(double numDecks) {
QVariant(pEQManifest->uniqueId()));
selectedEQEffectIndex = box->findData(
QVariant(pEQManifest->uniqueId()));
// Deactivate item to hoepfully clarify the item is not an EQ
const QStandardItemModel* model = qobject_cast<QStandardItemModel*>(box->model());
auto item = model->item(selectedEQEffectIndex);
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
}
}
box->setCurrentIndex(selectedEQEffectIndex);
Expand Down Expand Up @@ -341,6 +346,10 @@ void DlgPrefMixer::populateDeckEqSelectors() {
box->addItem(pCurrentlySelectedManifest->displayName(),
QVariant(pCurrentlySelectedManifest->uniqueId()));
currentIndex = i;
// Deactivate item to hoepfully clarify the item is not an EQ
const QStandardItemModel* model = qobject_cast<QStandardItemModel*>(box->model());
auto item = model->item(currentIndex);
item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
}
box->setCurrentIndex(currentIndex);
}
Expand Down

0 comments on commit de7810d

Please sign in to comment.