Browse Source

fix x-alignment not working in osmd-extended because of a previous "fix" causing issues (#104)

see previous commit and the discussion in #104.
Also for the x-alignment fix:
https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/pull/1427
sschmidTU 1 year ago
parent
commit
194926edc0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/MusicalScore/Graphical/MusicSystemBuilder.ts

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

@@ -509,7 +509,8 @@ export class MusicSystemBuilder {
             }
         }
         measure.InitiallyActiveClef = currentClef ?? this.activeClefs[visibleStaffIdx];
-        measure.resetLayout(); // (only) needed for JustifiedMusicSystemBuilder
+        // measure.resetLayout(); // this "fixes" a key signature change accidentals issue (extended 104),
+        //   but is actually not really a fix, it just sets the stave.clef to treble probably, and causes a bug in x-alignment
         if (isSystemStartMeasure) {
             if (!currentClef) {
                 currentClef = this.activeClefs[visibleStaffIdx];