Skip to content

Commit

Permalink
Fix a bug on the "Remove unused channels" command (#5559)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
IanCaio authored Jul 7, 2020
1 parent fd04efd commit 5aba3d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gui/FxMixerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5aba3d2

Please sign in to comment.