mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Insert line and page breaks
This commit is contained in:
parent
d78ceb8258
commit
25d151d5af
2188
English.lproj/MainMenu.nib/designable.nib
generated
2188
English.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -58,6 +58,10 @@ void VLLilypondWriter::VisitMeasure(size_t m, VLProperties & p, VLMeasure & meas
|
|||
bool repeat;
|
||||
|
||||
fAccum.clear();
|
||||
if (meas.fBreak == VLMeasure::kNewPage)
|
||||
fAccum += fIndent+"\\pageBreak\n";
|
||||
else if (meas.fBreak == VLMeasure::kNewSystem)
|
||||
fAccum += fIndent+"\\break\n";
|
||||
if (fSong->DoesEndRepeat(m)) {
|
||||
fAccum += "}\n";
|
||||
fIndent = "";
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
- (IBAction)editRepeat:(id)sender;
|
||||
- (IBAction)editRepeatEnding:(id)sender;
|
||||
- (IBAction)insertStartCoda:(id)sender;
|
||||
- (IBAction)insertJumpToCoda:(id)sender;
|
||||
- (IBAction)insertBreak:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -75,6 +75,15 @@ static VLSong sPasteboard;
|
|||
if (fSelStart == fSelEnd) {
|
||||
[item setState:[self song]->fCoda==fSelStart];
|
||||
|
||||
return YES;
|
||||
} else
|
||||
return NO;
|
||||
else if (action == @selector(insertBreak:))
|
||||
if (fSelStart == fSelEnd && fSelStart > 0) {
|
||||
VLSong * song = [self song];
|
||||
[item setState:fSelStart < song->fMeasures.size()
|
||||
&& song->fMeasures[fSelStart].fBreak == [item tag]];
|
||||
|
||||
return YES;
|
||||
} else
|
||||
return NO;
|
||||
|
@ -262,4 +271,18 @@ static VLSong sPasteboard;
|
|||
[[self document] didChangeSong];
|
||||
}
|
||||
|
||||
- (IBAction)insertBreak:(id)sender
|
||||
{
|
||||
[[self document] willChangeSong];
|
||||
VLSong * song = [self song];
|
||||
VLMeasure & meas = song->fMeasures[fSelStart];
|
||||
if (meas.fBreak == [sender tag])
|
||||
meas.fBreak = 0;
|
||||
else
|
||||
meas.fBreak = [sender tag];
|
||||
fNeedsRecalc = kRecalc;
|
||||
[self setNeedsDisplay:YES];
|
||||
[[self document] didChangeSong];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue
Block a user