From af09b4f881888b97903cda57907cda571be83b18 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 12 Sep 2013 18:51:51 +0200 Subject: Chain clones after loading a file. Fixes Windfisch/muse#12 --- muse2/muse/track.cpp | 7 +++++-- muse2/muse/wavetrack.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp index 98935315..8d30fccb 100644 --- a/muse2/muse/track.cpp +++ b/muse2/muse/track.cpp @@ -902,7 +902,7 @@ void MidiTrack::read(Xml& xml) switch (token) { case Xml::Error: case Xml::End: - return; + goto out_of_MidiTrackRead_forloop; case Xml::TagStart: if (tag == "transposition") transposition = xml.parseInt(); @@ -989,12 +989,15 @@ void MidiTrack::read(Xml& xml) if (tag == "miditrack" || tag == "drumtrack" || tag == "newdrumtrack") { setInPortAndChannelMask(portmask, chanmask); // Support old files. - return; + goto out_of_MidiTrackRead_forloop; } default: break; } } + +out_of_MidiTrackRead_forloop: + chainTrackParts(this); } void MidiTrack::readOurDrumSettings(Xml& xml) diff --git a/muse2/muse/wavetrack.cpp b/muse2/muse/wavetrack.cpp index 41beeb97..f21992a6 100644 --- a/muse2/muse/wavetrack.cpp +++ b/muse2/muse/wavetrack.cpp @@ -184,7 +184,7 @@ void WaveTrack::read(Xml& xml) switch (token) { case Xml::Error: case Xml::End: - return; + goto out_of_WaveTrackRead_forloop; case Xml::TagStart: if (tag == "part") { Part* p = 0; @@ -200,12 +200,14 @@ void WaveTrack::read(Xml& xml) case Xml::TagEnd: if (tag == "wavetrack") { mapRackPluginsToControllers(); - return; + goto out_of_WaveTrackRead_forloop; } default: break; } } +out_of_WaveTrackRead_forloop: + chainTrackParts(this); } //--------------------------------------------------------- -- cgit v1.2.3