mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14: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)
|
if (fromProp.fTime == toProp.fTime && fromProp.fDivisions == toProp.fDivisions)
|
||||||
return notes;
|
return notes;
|
||||||
VLNoteList newNotes(notes);
|
VLNoteList newNotes;
|
||||||
if (fromProp.fTime < toProp.fTime) {
|
if (fromProp.fTime < toProp.fTime) {
|
||||||
VLNote rest(toProp.fTime-fromProp.fTime);
|
VLNote rest(toProp.fTime-fromProp.fTime);
|
||||||
|
newNotes = notes;
|
||||||
newNotes.push_back(rest);
|
newNotes.push_back(rest);
|
||||||
} else if (fromProp.fTime > toProp.fTime) {
|
} else if (fromProp.fTime > toProp.fTime) {
|
||||||
VLNoteList::const_iterator i = notes.begin();
|
VLNoteList::const_iterator i = notes.begin();
|
||||||
|
@ -1222,8 +1223,10 @@ void VLSong::ChangeDivisions(int section, int newDivisions)
|
||||||
void VLSong::ChangeTime(int section, VLFraction newTime)
|
void VLSong::ChangeTime(int section, VLFraction newTime)
|
||||||
{
|
{
|
||||||
VLProperties & prop = fProperties[section];
|
VLProperties & prop = fProperties[section];
|
||||||
if (prop.fTime == newTime)
|
if (prop.fTime == newTime) {
|
||||||
return; // No change
|
prop.fTime = newTime; // Handle changes like 3/4 -> 6/8
|
||||||
|
return; // Trivial or no change
|
||||||
|
}
|
||||||
VLProperties newProp = prop;
|
VLProperties newProp = prop;
|
||||||
newProp.fTime = newTime;
|
newProp.fTime = newTime;
|
||||||
for (size_t measure=0; measure<fMeasures.size(); ++measure)
|
for (size_t measure=0; measure<fMeasures.size(); ++measure)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user