mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Improve handling of empty songs
This commit is contained in:
parent
4a5e1574ca
commit
83194fc368
|
@ -2288,6 +2288,8 @@ void VLSongVisitor::VisitMeasures(VLSong & song, bool performanceOrder)
|
|||
}
|
||||
} else {
|
||||
size_t e = song.CountMeasures() - song.EmptyEnding();
|
||||
if (!e && song.CountMeasures())
|
||||
e = 1;
|
||||
|
||||
for (size_t m=0; m!=e; ++m) {
|
||||
VLMeasure & meas = song.fMeasures[m];
|
||||
|
|
|
@ -491,6 +491,11 @@ advanceAt:
|
|||
[self readMeasuresFromPlist:[plist objectForKey:@"measures"]];
|
||||
[undoMgr enableUndoRegistration];
|
||||
|
||||
if (song->fMeasures.empty()) {
|
||||
delete song;
|
||||
song = new VLSong(true);
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user