Browse Source

repair delete track

master
Nils 4 years ago
parent
commit
75feae1c49
  1. 2
      qtgui/songeditor.py

2
qtgui/songeditor.py

@ -124,6 +124,8 @@ class SongEditor(QtWidgets.QGraphicsScene):
#We had these tracks in the GUI but they are gone in the export. This is track delete.
for trackId in toDelete:
trackStructure = self.tracks[trackId]
for position, switch in trackStructure.switches.items():
self.removeItem(switch) #switches are direct children of the scene. delete them here.
#we don't need to delete from trackOrder here because that is cleared each time we call this function
del self.tracks[trackId]
self.removeItem(trackStructure) #remove from scene

Loading…
Cancel
Save