PianoView: send NoteOff MIDI events for all keys on focus out
Commit491910357bwas a first try to fix bug #3052228 but it broke InstrumentPlayHandle-driven instruments. When losing focus now simply send NoteOff MIDI events for all keys regardless of the state indicated by Piano::m_pressedKeys. Closes #3052228. (cherry picked from commitf8e73c5293)
This commit is contained in:
@@ -713,13 +713,10 @@ void PianoView::focusOutEvent( QFocusEvent * )
|
||||
// hang otherwise
|
||||
for( int i = 0; i < NumKeys; ++i )
|
||||
{
|
||||
if( m_piano->m_pressedKeys[i] == true )
|
||||
{
|
||||
m_piano->m_midiEvProc->processInEvent(
|
||||
m_piano->m_midiEvProc->processInEvent(
|
||||
midiEvent( MidiNoteOff, 0, i, 0 ),
|
||||
midiTime() );
|
||||
m_piano->m_pressedKeys[i] = false;
|
||||
}
|
||||
m_piano->m_pressedKeys[i] = false;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user