Ver Fonte

fix repetition error (#23) leading to some voltas not recognized

fixes #23
sschmid há 4 anos atrás
pai
commit
ece0071613

+ 2 - 2
src/MusicalScore/ScoreIO/MusicSymbolModules/RepetitionCalculator.ts

@@ -589,7 +589,7 @@ export class RepetitionCalculator {
   //     }
   //     const openRep: RepetitionBuildingContainer = this.openRepetitions.last();
   //     const rep: Repetition = openRep.RepetitonUnderConstruction;
-  //     if (rep.BackwardJumpInstructions.length > 0 && rep.EndingParts.length > 0 && rep.EndingParts.last().Part.EndIndex + 1 < this.currentMeasureIndex) {
+  //     if (rep.BackwardJumpInstructions.length > 0 && rep.EndingParts.length > 0 && rep.EndingParts.last().part.EndIndex + 1 < this.currentMeasureIndex) {
   //         this.finalizeRepetition(openRep);
   //     }
   // }
@@ -642,7 +642,7 @@ export class RepetitionCalculator {
           if (lastRep.BackwardJumpInstructions.length > 0) {
             const keys: string[] = Object.keys(lastRep.EndingIndexDict);
             if (keys.length === 0 ||
-                lastRep.EndingIndexDict[keys[keys.length - 1]].Value.Part.EndIndex >= 0) {
+                lastRep.EndingIndexDict[keys[keys.length - 1]].part.EndIndex >= 0) {
                 this.finalizeRepetition(last);
             }
           }