소스 검색

fix(Layout): Don't automatically create new system after final barline. add EngravingRules.NewSystemAfterFinalBarline

needs to be set to true in mpat

sample slur test high notes: give concrete title (instead of 'Title')
sschmid 4 년 전
부모
커밋
7a0a1e4867
3개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      src/MusicalScore/Graphical/EngravingRules.ts
  2. 1 1
      src/MusicalScore/Graphical/MusicSystemBuilder.ts
  3. 2 2
      test/data/Slurtest_highNotes.musicxml

+ 2 - 0
src/MusicalScore/Graphical/EngravingRules.ts

@@ -60,6 +60,7 @@ export class EngravingRules {
     public KeyRightMargin: number;
     public RhythmRightMargin: number;
     public ShowRhythmAgainAfterPartEndOrFinalBarline: boolean;
+    public NewSystemAfterFinalBarline: boolean;
     public InStaffClefScalingFactor: number;
     public DistanceBetweenNaturalAndSymbolWhenCancelling: number;
     public NoteHelperLinesOffset: number;
@@ -319,6 +320,7 @@ export class EngravingRules {
         this.KeyRightMargin = 0.75;
         this.RhythmRightMargin = 1.25;
         this.ShowRhythmAgainAfterPartEndOrFinalBarline = true;
+        this.NewSystemAfterFinalBarline = false;
         this.InStaffClefScalingFactor = 0.8;
         this.DistanceBetweenNaturalAndSymbolWhenCancelling = 0.4;
 

+ 1 - 1
src/MusicalScore/Graphical/MusicSystemBuilder.ts

@@ -140,7 +140,7 @@ export class MusicSystemBuilder {
                 );
                 this.updateActiveClefs(sourceMeasure, graphicalMeasures);
                 this.measureListIndex++;
-                if (sourceMeasureEndsPart) {
+                if (sourceMeasureEndsPart && this.rules.NewSystemAfterFinalBarline) {
                     this.finalizeCurrentAndCreateNewSystem(graphicalMeasures, !this.rules.StretchLastSystemLine, false);
                 }
                 prevMeasureEndsPart = sourceMeasureEndsPart;

+ 2 - 2
test/data/Slurtest_highNotes.musicxml

@@ -2,10 +2,10 @@
 <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
 <score-partwise version="3.1">
   <work>
-    <work-title>Title</work-title>
+    <work-title>Slur Test - High Notes</work-title>
     </work>
   <identification>
-    <creator type="composer">Composer</creator>
+    <creator type="composer">OSMD</creator>
     <encoding>
       <software>MuseScore 3.0.2</software>
       <encoding-date>2020-06-19</encoding-date>