Переглянути джерело

fix(Transpose): fix transposing back to original key showing extra accidentals (#56)

close #56

fix https://github.com/opensheetmusicdisplay/osmd-extended/issues/2
sschmid 4 роки тому
батько
коміт
6f3ff344fc
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      src/MusicalScore/Graphical/MusicSheetCalculator.ts

+ 1 - 2
src/MusicalScore/Graphical/MusicSheetCalculator.ts

@@ -2161,8 +2161,7 @@ export abstract class MusicSheetCalculator {
                 const instruction: AbstractNotationInstruction = sourceMeasure.FirstInstructionsStaffEntries[staffIndex].Instructions[idx];
                 if (instruction instanceof KeyInstruction) {
                     const key: KeyInstruction = KeyInstruction.copy(instruction);
-                    if (this.graphicalMusicSheet.ParentMusicSheet.Transpose !== 0 &&
-                        measure.ParentStaff.ParentInstrument.MidiInstrumentId !== MidiInstrument.Percussion &&
+                    if (measure.ParentStaff.ParentInstrument.MidiInstrumentId !== MidiInstrument.Percussion &&
                         MusicSheetCalculator.transposeCalculator) {
                         MusicSheetCalculator.transposeCalculator.transposeKey(
                             key, this.graphicalMusicSheet.ParentMusicSheet.Transpose