Browse Source

Fix crash when trying to edit a hidden track in the track editor

master
Nils 2 months ago
parent
commit
1092c5476f
  1. 2
      engine/items.py
  2. 2
      engine/track.py
  3. 5
      qtgui/trackEditor.py

2
engine/items.py

@ -2403,7 +2403,7 @@ class Clef(Item):
}
def _lilypond(self, carryLilypondRanges):
return "\\clef \"{}\"".format(self.clefString)
return f'\\clef "{self.clefString}"'
class TimeSignature(Item): #Deprecated since 1750
"""Meter information. Nominator is how many notes in one measure and

2
engine/track.py

@ -857,7 +857,7 @@ class Track(object):
clef = ""
break
else:
clef = "\\clef " + self.initialClefKeyword + "\n" #internal clef keywords are the same as lilypond
clef = "\\clef \"" + self.initialClefKeyword + "\"\n" #internal clef keywords are the same as lilypond
#Initial Key Signature
for item in self.blocks[0].data[:4]:

5
qtgui/trackEditor.py

@ -393,7 +393,10 @@ class TrackEditor(QtWidgets.QWidget):
widget = TrackWidget(self, trackExportObject)
self.tracks[trackExportObject["id"]] = widget
self.layout.insertWidget(-1, widget)
widget.setTitle(f'Track {trackExportObject["index"]+1} - id: {trackExportObject["id"]}')
if trackExportObject["index"]: #track visible?
widget.setTitle(f'Track {trackExportObject["index"]+1} - id: {trackExportObject["id"]}')
else:
widget.setTitle(f'Track id: {trackExportObject["id"]}')
else:
leftOver.remove(trackExportObject["id"])

Loading…
Cancel
Save