Improve mixer channel update for mute events

Improve the mixer channel update for mute events by not delegating to `MixerView` like for the solo case. Instead the `MixerChannelView` now has its own `toggledMute` slot which simply updates the widget on changes to the mute model.

Also fix `MixerChannelView::setChannelIndex` by disconnecting from the signals of the previous mixer channel and connecting to the signals for the new one.

Remove `toggledMute` from `MixerView`.

The solo implementation is kept as is because it also triggers changes to the core model. So the chain seems to be:
* Solo button clicked in mixer channel view
* Button changes solo model
* Solo model signals to mixer view which was connected via the mixer channel view
* Mixer view performs changes in the other core models
* All mixer channels are updated.

Are better chain would first update the core models and then update the GUI from the changes:
* Solo button clicked in mixer channel view
* Button changes solo model
* Solo model signals to core mixer, i.e. not a view!
* Mixer view performs changes in the other core models
* Changed models emit signal to GUI elements
This commit is contained in:
Michael Gregorius
2024-01-10 18:19:49 +01:00
parent 2658751255
commit ede65963ea
4 changed files with 22 additions and 9 deletions

View File

@@ -97,6 +97,7 @@ namespace lmms::gui
void removeUnusedChannels();
void moveChannelLeft();
void moveChannelRight();
void toggledMute();
private:
QString elideName(const QString& name);

View File

@@ -98,7 +98,6 @@ protected:
private slots:
void updateFaders();
void toggledSolo();
void toggledMute();
private:
void updateAllMixerChannels();