PianoView: call InstrumentTrack::silenceAllNotes() on focus out
If we lose focus, call InstrumentTrack::silenceAllNotes() after
explicitely sending NoteOff MIDI events for all keys for which presses
were recorded. In case the arpeggiator is enabled this is not
sufficient. Fixes hanging notes when switching active subwindow while
pressing keys in an instrument track window with arpeggiator enabled.
Closes #3052228.
(cherry picked from commit 2f921303eb)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* Piano.cpp - implementation of piano-widget used in instrument-track-window
|
||||
* for testing + according model class
|
||||
* PianoView.cpp - implementation of piano widget used in instrument-track-window
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -23,7 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** \file piano.cpp
|
||||
/** \file PianoView.cpp
|
||||
* \brief A piano keyboard to play notes on in the instrument plugin window.
|
||||
*/
|
||||
|
||||
@@ -721,6 +720,9 @@ void PianoView::focusOutEvent( QFocusEvent * )
|
||||
m_piano->m_pressedKeys[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_piano->m_instrumentTrack->silenceAllNotes();
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user