From 0c815cbf70b788b70d48b67488ea27ee1aa2ca16 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 13 Jul 2008 21:13:58 +0000 Subject: [PATCH] Fix switch to 3/4, 6/8 --- Sources/VLModel.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index 860e466..a244827 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -1145,9 +1145,10 @@ static VLNoteList Realign(const VLNoteList & notes, { if (fromProp.fTime == toProp.fTime && fromProp.fDivisions == toProp.fDivisions) return notes; - VLNoteList newNotes(notes); + VLNoteList newNotes; if (fromProp.fTime < toProp.fTime) { VLNote rest(toProp.fTime-fromProp.fTime); + newNotes = notes; newNotes.push_back(rest); } else if (fromProp.fTime > toProp.fTime) { VLNoteList::const_iterator i = notes.begin(); @@ -1222,8 +1223,10 @@ void VLSong::ChangeDivisions(int section, int newDivisions) void VLSong::ChangeTime(int section, VLFraction newTime) { VLProperties & prop = fProperties[section]; - if (prop.fTime == newTime) - return; // No change + if (prop.fTime == newTime) { + prop.fTime = newTime; // Handle changes like 3/4 -> 6/8 + return; // Trivial or no change + } VLProperties newProp = prop; newProp.fTime = newTime; for (size_t measure=0; measure