소스 검색

fix clefs ignored at beginning of measure (#954)

this was a regression (side effect) introduced by the fix for #954.
sschmid 4 년 전
부모
커밋
36eab5e9d5
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/MusicalScore/ScoreIO/InstrumentReader.ts

+ 3 - 3
src/MusicalScore/ScoreIO/InstrumentReader.ts

@@ -900,9 +900,9 @@ export class InstrumentReader {
         // TODO problem: in saveAbstractInstructionList, this is always saved in this.currentStaffEntry.
         //   so when there's a <forward> or <backup> instruction in <attributes> (which is unfortunate encoding), this gets misplaced.
         //   so for now we skip it.
-        const skipClefInstruction: boolean =
-          previousNode?.name === "forward" ||
-          previousNode?.name === "backup";
+        const skipClefInstruction: boolean = previousNode?.name === "forward";
+          // || previousNode?.name === "backup") && // necessary for clef at beginning of measure/system,
+          //   see sample test_staverepetitions_coda_etc.musicxml, where the bass clef was placed over a previous treble clef
         if (!skipClefInstruction) {
           const clefInstruction: ClefInstruction = new ClefInstruction(clefEnum, clefOctaveOffset, line);
           this.abstractInstructions.push([staffNumber, clefInstruction]);