1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-19 01:08:02 +01:00

Change lots of code that uses linking to use the new

scheme.
This commit is contained in:
businessmanprogrammersteve
2010-02-16 20:50:38 +00:00
parent 98ca2b474b
commit e35e019e17
22 changed files with 344 additions and 530 deletions

View File

@@ -247,31 +247,12 @@ void Effect::CopyInputTracks(int trackType)
TrackListOfKindIterator aIt(trackType, mTracks);
t2bHash added;
//for each track that is selected
for (Track *aTrack = aIt.First(); aTrack; aTrack = aIt.Next()) {
if (!aTrack->GetSelected()) {
continue;
}
TrackGroupIterator gIt(mTracks);
Track *gTrack = gIt.First(aTrack);
//if the track is part of a group
if (trackType == Track::All && gTrack != NULL) {
//go to the project tracks and add all the tracks in the same group
for( ; gTrack; gTrack = gIt.Next() ) {
// only add if the track was not added before
if (added.find(gTrack) == added.end()) {
added[gTrack]=true;
Track *o = gTrack->Duplicate();
mOutputTracks->Add(o);
mIMap.Add(gTrack);
mOMap.Add(o);
}
}
}
//otherwise just add the track
else {
// Include selected tracks, plus sync-selected tracks for Track::All)
if (aTrack->GetSelected() ||
(trackType == Track::All && aTrack->IsSynchroSelected()))
{
Track *o = aTrack->Duplicate();
mOutputTracks->Add(o);
mIMap.Add(aTrack);