diff --git a/src/widget/weffectchainpresetbutton.cpp b/src/widget/weffectchainpresetbutton.cpp index ed5d33da02f..52803616da3 100644 --- a/src/widget/weffectchainpresetbutton.cpp +++ b/src/widget/weffectchainpresetbutton.cpp @@ -9,7 +9,6 @@ WEffectChainPresetButton::WEffectChainPresetButton(QWidget* parent, EffectsManager* pEffectsManager) : QPushButton(parent), WBaseWidget(this), - m_iChainNumber(0), m_pEffectsManager(pEffectsManager), m_pChainPresetManager(pEffectsManager->getChainPresetManager()), m_pMenu(make_parented(new QMenu(this))) { @@ -22,9 +21,13 @@ WEffectChainPresetButton::WEffectChainPresetButton(QWidget* parent, EffectsManag } void WEffectChainPresetButton::setup(const QDomNode& node, const SkinContext& context) { - m_iChainNumber = EffectWidgetUtils::getEffectUnitNumberFromNode(node, context); m_pChain = EffectWidgetUtils::getEffectChainFromNode( node, context, m_pEffectsManager); + VERIFY_OR_DEBUG_ASSERT(m_pChain) { + SKIN_WARNING(node, context) + << "EffectChainPresetButton node could not attach to effect chain"; + return; + } connect(m_pChain.get(), &EffectChain::chainPresetChanged, this, diff --git a/src/widget/weffectchainpresetbutton.h b/src/widget/weffectchainpresetbutton.h index e04243fc0c8..2b0fa6242ae 100644 --- a/src/widget/weffectchainpresetbutton.h +++ b/src/widget/weffectchainpresetbutton.h @@ -21,7 +21,6 @@ class WEffectChainPresetButton : public QPushButton, public WBaseWidget { private: bool event(QEvent* pEvent); - int m_iChainNumber; EffectChainPointer m_pChain; EffectsManager* m_pEffectsManager; diff --git a/src/widget/weffectselector.cpp b/src/widget/weffectselector.cpp index e9e39849b88..25dfef52aaa 100644 --- a/src/widget/weffectselector.cpp +++ b/src/widget/weffectselector.cpp @@ -12,7 +12,6 @@ WEffectSelector::WEffectSelector(QWidget* pParent, EffectsManager* pEffectsManager) : QComboBox(pParent), WBaseWidget(this), - m_iEffectSlotIndex(-1), m_pEffectsManager(pEffectsManager), m_pVisibleEffectsList(pEffectsManager->getVisibleEffectsList()) { // Prevent this widget from getting focused by Tab/Shift+Tab @@ -28,8 +27,6 @@ void WEffectSelector::setup(const QDomNode& node, const SkinContext& context) { node, context, m_pEffectsManager); m_pEffectSlot = EffectWidgetUtils::getEffectSlotFromNode( node, context, pChainSlot); - m_iEffectSlotIndex = EffectWidgetUtils::getEffectSlotIndexFromNode( - node, context); if (m_pEffectSlot != nullptr) { connect(m_pVisibleEffectsList.data(), diff --git a/src/widget/weffectselector.h b/src/widget/weffectselector.h index 14a35227aad..c8c5b5b5624 100644 --- a/src/widget/weffectselector.h +++ b/src/widget/weffectselector.h @@ -22,7 +22,6 @@ class WEffectSelector : public QComboBox, public WBaseWidget { bool event(QEvent* pEvent) override; private: - int m_iEffectSlotIndex; EffectsManager* m_pEffectsManager; VisibleEffectsListPointer m_pVisibleEffectsList; EffectSlotPointer m_pEffectSlot;