mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +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);
|
||||
}
|
||||
if (fGoToCoda >= (int)beginMeasure)
|
||||
fGoToCoda += numMeas;
|
||||
if (fCoda >= (int)beginMeasure)
|
||||
fCoda += numMeas;
|
||||
} else {
|
||||
if (CountMeasures() < nextMeasure) {
|
||||
VLMeasure rest;
|
||||
|
@ -1992,6 +1996,17 @@ void VLSong::DeleteMeasures(size_t beginMeasure, size_t endMeasure, int mode)
|
|||
++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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue
Block a user