Selaa lähdekoodia

fix part abbreviations rendered when part names weren't rendered

this was necessary after the EngravingRules refactor where the RenderPartNames setter was removed.
(fixing the implementation of #841)

ideally we'd provide an option to render part abbreviations but not part names,
but that would require extra settings,
and it doesn't seem too useful or common.
sschmid 4 vuotta sitten
vanhempi
commit
52c520ea89
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  1. 2 3
      src/MusicalScore/Graphical/MusicSystem.ts

+ 2 - 3
src/MusicalScore/Graphical/MusicSystem.ts

@@ -301,9 +301,8 @@ export abstract class MusicSystem extends GraphicalObject {
                     systemLabelsRightMargin = 0; // might affect lyricist/tempo placement. but without this there's still some extra x-spacing.
                 }
             } else {
-                if (!this.rules.RenderPartAbbreviations
-                    // don't render part abbreviations if there's only one instrument/part (could be an option in the future)
-                    || this.staffLines.length === 1
+                if (!this.rules.RenderPartAbbreviations || !this.rules.RenderPartNames // don't render abbreviations if we don't render part names
+                    || this.staffLines.length === 1 // don't render part abbreviations if there's only one instrument/part (could be an option in the future)
                     || !instrument.PartAbbreviation
                     || instrument.PartAbbreviation === "") {
                     return;