diff --git a/include/MixerView.h b/include/MixerView.h index a47786481..bc99a3340 100644 --- a/include/MixerView.h +++ b/include/MixerView.h @@ -98,6 +98,10 @@ protected: private slots: void updateFaders(); void toggledSolo(); + void toggledMute(); + +private: + void updateAllMixerChannels(); private: QVector m_mixerChannelViews; diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 0f8ccedea..cbd9019f1 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -104,6 +104,7 @@ namespace lmms::gui m_muteButton->setInactiveGraphic(embed::getIconPixmap("led_green")); m_muteButton->setCheckable(true); m_muteButton->setToolTip(tr("Mute this channel")); + connect(&mixerChannel->m_muteModel, &BoolModel::dataChanged, mixerView, &MixerView::toggledMute, Qt::DirectConnection); m_soloButton = new PixmapButton(this, tr("Solo")); m_soloButton->setModel(&mixerChannel->m_soloModel); diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index a28ac7976..ea6a28948 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -283,6 +283,22 @@ void MixerView::loadSettings(const QDomElement& domElement) void MixerView::toggledSolo() { Engine::mixer()->toggledSolo(); + + updateAllMixerChannels(); +} + + +void MixerView::toggledMute() +{ + updateAllMixerChannels(); +} + +void MixerView::updateAllMixerChannels() +{ + for (int i = 0; i < m_mixerChannelViews.size(); ++i) + { + m_mixerChannelViews[i]->update(); + } }