|
|
@ -644,12 +644,14 @@ class TrackLabelEditor(QtWidgets.QGraphicsScene): |
|
|
|
self._exportDictScore = exportDictScore |
|
|
|
|
|
|
|
def callback_numberOfTracksChanged(self, exportDictList): |
|
|
|
|
|
|
|
toDelete = set(self.tracks.keys()) |
|
|
|
|
|
|
|
self._cachedExportDictsInOrder = exportDictList |
|
|
|
|
|
|
|
width = self.parentView.geometry().width() |
|
|
|
|
|
|
|
|
|
|
|
for index, exportDict in enumerate(exportDictList): |
|
|
|
if exportDict["id"] in self.tracks: |
|
|
|
toDelete.remove(exportDict["id"]) |
|
|
@ -660,6 +662,7 @@ class TrackLabelEditor(QtWidgets.QGraphicsScene): |
|
|
|
self.tracks[exportDict["id"]].setY(index * SIZE_UNIT + SIZE_TOP_OFFSET) |
|
|
|
self.tracks[exportDict["id"]].update(exportDict) |
|
|
|
|
|
|
|
|
|
|
|
#We had this tracks in the GUI but they are gone in the export. This is track delete. |
|
|
|
for trackId in toDelete: |
|
|
|
trackLabel = self.tracks[trackId] |
|
|
@ -673,6 +676,7 @@ class TrackLabelEditor(QtWidgets.QGraphicsScene): |
|
|
|
self.cachedCombinedTrackHeight = len(self.tracks) * SIZE_UNIT |
|
|
|
self.setSceneRect(0,0,width-1,self.cachedCombinedTrackHeight + 3*SIZE_TOP_OFFSET) |
|
|
|
|
|
|
|
|
|
|
|
def callback_patternLengthMultiplicatorChanged(self, exportDict): |
|
|
|
self.tracks[exportDict["id"]].update(exportDict) #general update function that also covers our value |
|
|
|
|
|
|
@ -909,7 +913,9 @@ class TrackLabel(QtWidgets.QGraphicsRectItem): |
|
|
|
self.exportDict = exportDict |
|
|
|
self.lineEdit.setText(exportDict["sequencerInterface"]["name"]) |
|
|
|
self.colorButton.setBrush(QtGui.QColor(exportDict["color"])) |
|
|
|
self.lengthMultiplicatorSpinBox.spinBox.blockSignals(True) |
|
|
|
self.lengthMultiplicatorSpinBox.spinBox.setValue(int(exportDict["patternLengthMultiplicator"])) |
|
|
|
self.lengthMultiplicatorSpinBox.spinBox.blockSignals(False) |
|
|
|
|
|
|
|
def mousePressEvent(self,event): |
|
|
|
self.parentScene.parentView.parentMainWindow.chooseCurrentTrack(self.exportDict) |
|
|
|