Adding new FX channel while in solo (#6717)

* Adding FX channel while in solo

New FX channel is muted when there is a soloed FX line. Fixes #6311

* Move var initialization to constructor
This commit is contained in:
superpaik
2023-06-24 04:57:52 +02:00
committed by GitHub
parent 989fc338fa
commit c8546633a2

View File

@@ -190,11 +190,11 @@ void MixerChannel::doProcessing()
Mixer::Mixer() :
Model( nullptr ),
JournallingObject(),
m_mixerChannels()
m_mixerChannels(),
m_lastSoloed(-1)
{
// create master channel
createChannel();
m_lastSoloed = -1;
}
@@ -224,6 +224,13 @@ int Mixer::createChannel()
// reset channel state
clearChannel( index );
// if there is a soloed channel, mute the new track
if (m_lastSoloed != -1 && m_mixerChannels[m_lastSoloed]->m_soloModel.value())
{
m_mixerChannels[index]->m_muteBeforeSolo = m_mixerChannels[index]->m_muteModel.value();
m_mixerChannels[index]->m_muteModel.setValue(true);
}
return index;
}