mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Fix handling of codas
This commit is contained in:
parent
273ee8ee73
commit
8eaa0fb1a5
|
@ -1756,8 +1756,8 @@ VLSong::iterator::iterator(const VLSong & song, bool end)
|
|||
bool repeat;
|
||||
fMeasure = 0;
|
||||
if (fSong.fCoda > 0
|
||||
&& !fSong.DoesEndRepeat(fMeasure)
|
||||
&& !fSong.DoesEndEnding(fMeasure, &repeat)
|
||||
&& !fSong.DoesEndRepeat(fSong.fCoda)
|
||||
&& !fSong.DoesEndEnding(fSong.fCoda, &repeat)
|
||||
)
|
||||
fStatus.push_back(Repeat(fMeasure, 2));
|
||||
AdjustStatus();
|
||||
|
@ -1791,11 +1791,16 @@ void VLSong::iterator::AdjustStatus()
|
|||
} else if (!repeat) {
|
||||
fStatus.pop_back();
|
||||
}
|
||||
if (fSong.fCoda > 0 && fMeasure==fSong.fGoToCoda)
|
||||
if (fStatus.size() && fStatus.back().fVolta == fStatus.back().fTimes-1) {
|
||||
if (fSong.fCoda > 0 && fMeasure==fSong.fGoToCoda) {
|
||||
for (size_t repeat = 0; repeat < fStatus.size(); ++repeat)
|
||||
if (fStatus[repeat].fVolta != fStatus[repeat].fTimes-1)
|
||||
goto notAtCoda;
|
||||
fStatus.clear();
|
||||
fMeasure = fSong.fCoda;
|
||||
|
||||
return;
|
||||
notAtCoda:
|
||||
;
|
||||
}
|
||||
if (fMeasure == fSong.CountMeasures()-fSong.EmptyEnding()
|
||||
|| (fSong.fCoda > 0 && fMeasure == fSong.fCoda)
|
||||
|
|
Loading…
Reference in New Issue
Block a user