mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 03:04:00 +00:00
Inherit lyrics on note replacement
This commit is contained in:
parent
f3acce05fa
commit
7d960d2033
|
@ -613,15 +613,26 @@ void VLSong::AddNote(VLLyricsNote note, size_t measure, VLFraction at)
|
|||
//
|
||||
if (i->fTied) {
|
||||
//
|
||||
// Break ties
|
||||
// Break backward ties, but not forward
|
||||
//
|
||||
if (i->fTied & VLNote::kTiedWithPrev)
|
||||
if (i->fTied & VLNote::kTiedWithPrev) {
|
||||
i->fTied &= ~VLNote::kTiedWithPrev;
|
||||
LastTie(fMeasures[measure-1]) &= ~VLNote::kTiedWithNext;
|
||||
if (i->fTied & VLNote::kTiedWithNext)
|
||||
FirstTie(fMeasures[measure+1]) &= ~VLNote::kTiedWithPrev;
|
||||
}
|
||||
if (i->fTied & VLNote::kTiedWithNext) {
|
||||
VLNoteList::iterator j = i;
|
||||
for (size_t tiedMeas = measure+1; j->fTied & VLNote::kTiedWithNext;++tiedMeas) {
|
||||
j = fMeasures[tiedMeas].fMelody.begin();
|
||||
j->fPitch = note.fPitch;
|
||||
j->fVisual= note.fVisual;
|
||||
}
|
||||
}
|
||||
}
|
||||
note.fDuration = i->fDuration;
|
||||
*i = note;
|
||||
//
|
||||
// Deliberately leave fLyrics alone
|
||||
//
|
||||
i->fPitch = note.fPitch;
|
||||
i->fVisual = note.fVisual;
|
||||
} else {
|
||||
//
|
||||
// Overlap, split current
|
||||
|
|
Loading…
Reference in New Issue
Block a user