PianoView: send NoteOff MIDI events for all keys on focus out
Commit 491910357b was 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.
This commit is contained in:
@@ -715,13 +715,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