From 091da479ac9f8ef84ce1ff0fd4b649281b2b88ec Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 30 Mar 2008 19:52:32 +0000 Subject: [PATCH] Handle clicks on tied notes --- Sources/VLModel.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index c8feba2..9c06b5e 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -1282,7 +1282,9 @@ bool VLSong::PrevWord(size_t stanza, size_t & measure, VLFraction & at) VLFraction now(0); while (note != meas.fMelody.end() && now < at) { - if (note->fPitch != VLNote::kNoPitch) + if (!(note->fTied & VLNote::kTiedWithPrev) + && note->fPitch != VLNote::kNoPitch + ) if (note->fLyrics.size() < stanza || !(note->fLyrics[stanza-1].fKind & VLSyllable::kHasPrev) ) { @@ -1316,7 +1318,10 @@ bool VLSong::NextWord(size_t stanza, size_t & measure, VLFraction & at) VLFraction now(0); while (note != meas.fMelody.end()) { - if (note->fPitch != VLNote::kNoPitch && (!firstMeasure || now>at)) + if (!(note->fTied & VLNote::kTiedWithPrev) + && note->fPitch != VLNote::kNoPitch + && (!firstMeasure || now>at) + ) if (note->fLyrics.size() < stanza || !(note->fLyrics[stanza-1].fKind & VLSyllable::kHasPrev) ) {