mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Properly handle coda on insert/delete
This commit is contained in:
parent
09c3d25dcf
commit
c5ad6c9ba6
|
@ -1913,6 +1913,10 @@ void VLSong::PasteMeasures(size_t beginMeasure, const VLSong & measures, int mod
|
||||||
}
|
}
|
||||||
fRepeats.push_back(repeat);
|
fRepeats.push_back(repeat);
|
||||||
}
|
}
|
||||||
|
if (fGoToCoda >= (int)beginMeasure)
|
||||||
|
fGoToCoda += numMeas;
|
||||||
|
if (fCoda >= (int)beginMeasure)
|
||||||
|
fCoda += numMeas;
|
||||||
} else {
|
} else {
|
||||||
if (CountMeasures() < nextMeasure) {
|
if (CountMeasures() < nextMeasure) {
|
||||||
VLMeasure rest;
|
VLMeasure rest;
|
||||||
|
@ -1992,6 +1996,17 @@ void VLSong::DeleteMeasures(size_t beginMeasure, size_t endMeasure, int mode)
|
||||||
++r;
|
++r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (fGoToCoda >= (int)beginMeasure)
|
||||||
|
if (fGoToCoda < endMeasure)
|
||||||
|
fGoToCoda = -1;
|
||||||
|
else
|
||||||
|
fGoToCoda -= delta;
|
||||||
|
if (fCoda >= (int)beginMeasure)
|
||||||
|
if (fCoda < endMeasure)
|
||||||
|
fCoda = -1;
|
||||||
|
else
|
||||||
|
fCoda -= delta;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Keep an empty measure at the end
|
// Keep an empty measure at the end
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user