Fix a bug on the "Remove unused channels" command (#5559)
On the FX mixer, the "Remove unused channels" action only checked for InstrumentTracks on every channel but ignored SampleTracks that could be linked to the particular FX channel. Because of that, if there was a channel where only SampleTracks are forwarded to and we clicked on "Remove unused channels", it was going to be removed. This commit fixes it.
This commit is contained in:
@@ -455,6 +455,15 @@ void FxMixerView::deleteUnusedChannels()
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( t->type() == Track::SampleTrack )
|
||||
{
|
||||
SampleTrack *strack = dynamic_cast<SampleTrack *>( t );
|
||||
if( i == strack->effectChannelModel()->value(0) )
|
||||
{
|
||||
empty=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
FxChannel * ch = Engine::fxMixer()->effectChannel( i );
|
||||
// delete channel if no references found
|
||||
|
||||
Reference in New Issue
Block a user