Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/effects/effectslot.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class EffectSlot : public QObject {
// returns a null EffectPointer.
EffectPointer getEffect() const;

inline bool getEnableState() const {
return m_pControlEnabled->toBool();
}

inline int getEffectSlotNumber() const {
return m_iEffectNumber;
}
Expand Down
33 changes: 26 additions & 7 deletions src/preferences/dialog/dlgprefeq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,15 +492,34 @@ void DlgPrefEQ::applySelections() {
box->setCurrentIndex(firstEffectIndex);
}

EffectPointer pEffect = m_pEffectsManager->instantiateEffect(effectId);
m_pQuickEffectRack->loadEffectToGroup(group, pEffect);
// Only apply the effect if it changed -- so first interrogate the
// loaded effect if any.
bool need_load = true;
if (m_pQuickEffectRack->numEffectChainSlots() > deck) {
// It's not correct to get a chainslot by index number -- get by
// group name instead.
EffectChainSlotPointer chainslot =
m_pQuickEffectRack->getGroupEffectChainSlot(group);
if (chainslot && chainslot->numSlots()) {
EffectPointer effectpointer =
chainslot->getEffectSlot(0)->getEffect();
if (effectpointer &&
effectpointer->getManifest().id() == effectId) {
need_load = false;
}
}
}
if (need_load) {
EffectPointer pEffect = m_pEffectsManager->instantiateEffect(effectId);
m_pQuickEffectRack->loadEffectToGroup(group, pEffect);

m_pConfig->set(ConfigKey(kConfigKey, "QuickEffectForGroup_" + group),
ConfigValue(effectId));
m_pConfig->set(ConfigKey(kConfigKey, "QuickEffectForGroup_" + group),
ConfigValue(effectId));

// This is required to remove a previous selected effect that does not
// fit to the current ShowAllEffects checkbox
slotPopulateDeckEffectSelectors();
// This is required to remove a previous selected effect that does not
// fit to the current ShowAllEffects checkbox
slotPopulateDeckEffectSelectors();
}
++deck;
}
}
Expand Down