mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 03:04:00 +00:00
Fix switch to 3/4, 6/8
This commit is contained in:
parent
e9ee2571f2
commit
0c815cbf70
|
@ -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<fMeasures.size(); ++measure)
|
||||
|
|
Loading…
Reference in New Issue
Block a user