|
|
@ -1023,11 +1023,18 @@ class Data(template.engine.sequencer.Score): |
|
|
|
|
|
|
|
#for trId, track in Track.allTracks.items(): |
|
|
|
for track in list(self.hiddenTracks.keys()) + self.tracks: |
|
|
|
if len(track.blocks) <= 1: |
|
|
|
continue #next track |
|
|
|
|
|
|
|
#Get all blocks and then remove those with no content. |
|
|
|
trId = id(track) |
|
|
|
listOfBlockIds = track.asListOfBlockIds() |
|
|
|
listOfBlockIds = track.asListOfBlockIds() |
|
|
|
for block in track.blocks: |
|
|
|
if not block.data and len(track.blocks) > 1: |
|
|
|
if not block.data: |
|
|
|
listOfBlockIds.remove(id(block)) |
|
|
|
#Maybe the track was empty. In this case we add one of the blocks again. Otherwise follow up functions will not act. |
|
|
|
if not listOfBlockIds: |
|
|
|
listOfBlockIds.append(id(block)) |
|
|
|
dictOfTrackIdsWithListOfBlockIds[trId] = listOfBlockIds |
|
|
|
return dictOfTrackIdsWithListOfBlockIds |
|
|
|
|
|
|
|