@ -176,7 +176,6 @@ class PatternGrid(QtWidgets.QGraphicsScene):
self . _fullRedraw ( newCurrentTrackId )
def callback_patternChanged ( self , exportDict , force = False ) :
""" We receive the whole track as exportDict.
exportDict [ " pattern " ] is the data structure example in the class docstring .
@ -729,8 +728,12 @@ class Scale(QtWidgets.QGraphicsRectItem):
pitches ! Pitches can be any order the user wants .
"""
for widget , scaleMidiPitch in zip ( self . pitchWidgets , scaleList ) :
widget . blockSignals ( True ) #choose active track triggers valueChanged, which triggers sendToENgine
widget . spinBox . blockSignals ( True ) #choose active track triggers valueChanged, which triggers sendToENgine
widget . spinBox . setValue ( scaleMidiPitch )
widget . rememberLastValue = scaleMidiPitch
widget . blockSignals ( False )
widget . spinBox . blockSignals ( False )
def setNoteNames ( self , pNoteNames ) :
""" A list of 128 strings. Gets only called by the callback.
@ -932,10 +935,10 @@ class PitchWidget(QtWidgets.QGraphicsProxyWidget):
exit ( )
def spinBoxValueChanged ( self ) :
""" This triggers at multiple occasions, include track change.
Everything that triggers focus lost """
self . label . setText ( self . midiToNotename ( self . spinBox . value ( ) ) )
self . blockSignals ( True )
self . spinBoxEditingFinished ( callback = False )
self . blockSignals ( False )
#self.spinBoxEditingFinished(callback=False) . No. This was to send updates when the user uses the arrow keys to change pitch. But that horrible side effects like api.setScale for every note for every track change, incl. undo registration.
def spinBoxEditingFinished ( self , callback = True ) :
if not self . rememberLastValue == self . spinBox . value ( ) :