Browse Source

fix crash with MultiMeasureRest export for cursor and lilypond when removing the metrical context beforehand

master
Nils 2 years ago
parent
commit
104fec18df
  1. 6
      engine/items.py

6
engine/items.py

@ -2073,6 +2073,12 @@ class MultiMeasureRest(Item):
def _lilypond(self, carryLilypondRanges):
"""Called by block.lilypond(carryLilypondRanges), returns a string.
See Item.lilypond for the general docstring."""
if not self._cachedOneMeasureInTicks:
#it is possible to end up with MM-Rests in a track without any metrical instruction. Linked blocks, deleting the metrical after placing MMRests etc.
#This would crash the next lookup because _cachedMetricalInstruction is None
return ""
lyduration = "{}/{}".format(self._cachedMetricalInstruction.nominator, duration.baseDurationToTraditionalNumber[self._cachedMetricalInstruction.denominator])
if self.lilypondParameters["visible"]:

Loading…
Cancel
Save