diff --git a/ChangeLog b/ChangeLog index 769ebf5b2..16c7cba43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-10-16 Tobias Doerffel + * src/core/piano.cpp: + reclaim keyboard focus if the current focus-widget lives in the same + instrument-track-window as the previously active test piano - this way + running notes are not stopped when modifying a control in the same + instrument-track-window (closes #2139806) + * include/file_browser.h: * src/gui/file_browser.cpp: heavily improved performance when adding items to file browser diff --git a/src/core/piano.cpp b/src/core/piano.cpp index af2c91356..a9cff9a19 100644 --- a/src/core/piano.cpp +++ b/src/core/piano.cpp @@ -715,6 +715,16 @@ void pianoView::focusOutEvent( QFocusEvent * ) { return; } + + // focus just switched to another control inside the instrument track + // window we live in? + if( parentWidget()->parentWidget()->focusWidget() != this ) + { + // then reclaim keyboard focus! + setFocus(); + return; + } + // if we loose focus, we HAVE to note off all running notes because // we don't receive key-release-events anymore and so the notes would // hang otherwise