Browse Source

Guard against race condition where a note-off gui notification comes right after the instrument has been disabled

master
Nils 1 year ago
parent
commit
4168794620
  1. 2
      qtgui/instrument.py

2
qtgui/instrument.py

@ -309,6 +309,7 @@ class InstrumentTreeController(object):
def react_instrumentStatusChanged(self, instrumentStatus:dict):
self.parentMainWindow.qtApp.restoreOverrideCursor() #Sometimes the instrument was loaded with a cursor animation
if instrumentStatus["idKey"] in self.guiInstruments:
gi = self.guiInstruments[instrumentStatus["idKey"]]
gi.updateStatus(instrumentStatus)
self._adjustColumnSize()
@ -327,6 +328,7 @@ class InstrumentTreeController(object):
def react_instrumentMidiNoteOnActivity(self, idKey:tuple, pitch:int, velocity:int):
#First figure out which instrument has activity
if idKey in self.guiInstruments:
gi = self.guiInstruments[idKey]
gi.activity() #We only do a quick flash here. No need for velocity, pitch or note-off

Loading…
Cancel
Save