瀏覽代碼

fix(MeasureNumbers): don't reset measure number count if this.rules.NewSystemAndPartAfterFinalBarline disabled

amendment to 7a0a1e4867d210611495919934ac599e4373cee0

original commit that added the new system and reset measure numbers behavior:
1c76733d5a55166e518e136e210a834607723fde
sschmid 4 年之前
父節點
當前提交
0991aac86a

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

@@ -60,7 +60,7 @@ export class EngravingRules {
     public KeyRightMargin: number;
     public RhythmRightMargin: number;
     public ShowRhythmAgainAfterPartEndOrFinalBarline: boolean;
-    public NewSystemAfterFinalBarline: boolean;
+    public NewSystemAndPartAfterFinalBarline: boolean;
     public InStaffClefScalingFactor: number;
     public DistanceBetweenNaturalAndSymbolWhenCancelling: number;
     public NoteHelperLinesOffset: number;
@@ -320,7 +320,7 @@ export class EngravingRules {
         this.KeyRightMargin = 0.75;
         this.RhythmRightMargin = 1.25;
         this.ShowRhythmAgainAfterPartEndOrFinalBarline = true;
-        this.NewSystemAfterFinalBarline = false;
+        this.NewSystemAndPartAfterFinalBarline = 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 && this.rules.NewSystemAfterFinalBarline) {
+                if (sourceMeasureEndsPart && this.rules.NewSystemAndPartAfterFinalBarline) {
                     this.finalizeCurrentAndCreateNewSystem(graphicalMeasures, !this.rules.StretchLastSystemLine, false);
                 }
                 prevMeasureEndsPart = sourceMeasureEndsPart;

+ 1 - 1
src/MusicalScore/ScoreIO/MusicSheetReader.ts

@@ -147,7 +147,7 @@ export class MusicSheetReader /*implements IMusicSheetReader*/ {
         }
 
         while (couldReadMeasure) {
-            if (this.currentMeasure !== undefined && this.currentMeasure.HasEndLine) {
+            if (this.currentMeasure !== undefined && this.currentMeasure.HasEndLine && this.rules.NewSystemAndPartAfterFinalBarline) {
                 sourceMeasureCounter = 0;
             }
             this.currentMeasure = new SourceMeasure(this.completeNumberOfStaves, this.musicSheet.Rules);