diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-03-26 22:46:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-03 07:29:17 +0000 |
commit | ae0de4ffdb480745b69d2d6413c656db4112d4a7 (patch) | |
tree | 897d9cb005322de769a45c5ed2960bf2c871471c | |
parent | 4176d652a5aa31e6ea7a1be1798819ceb0d2b007 (diff) |
tdf#81813: Typing to select value in dropdown resets after space character
Change-Id: I6972cdad9708a46bb8338590312196e55c4f8778
Reviewed-on: https://gerrit.libreoffice.org/15024
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 44c87a5dc921ea6dd28fdc016c61aa62cfd4f4d6)
Reviewed-on: https://gerrit.libreoffice.org/15098
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 9c66383c282e..29f54626a967 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -1356,6 +1356,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3(); bool bMod2 = aKeyCode.IsMod2(); bool bDone = false; + bool bHandleKey = false; switch( aKeyCode.GetCode() ) { @@ -1571,7 +1572,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) } bDone = true; } - maQuickSelectionEngine.Reset(); + bHandleKey = true; } break; @@ -1594,18 +1595,21 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) maQuickSelectionEngine.Reset(); bDone = true; - break; } - } - // fall through intentional - default: - { - if ( !IsReadOnly() ) + else { - bDone = maQuickSelectionEngine.HandleKeyEvent( rKEvt ); + bHandleKey = true; } - } + } break; + + default: + bHandleKey = true; + break; + } + if (bHandleKey && !IsReadOnly()) + { + bDone = maQuickSelectionEngine.HandleKeyEvent( rKEvt ); } if ( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) |