[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/inc vcl/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 3 06:47:35 UTC 2019
vcl/inc/listbox.hxx | 1 +
vcl/source/control/combobox.cxx | 2 +-
vcl/source/control/imp_listbox.cxx | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit e9ced64ffac0752e2bbd2879ea267116502606fc
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 27 16:43:19 2019 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Tue Dec 3 07:46:45 2019 +0100
tdf#129043 Correctly deliver combo box events when used with keyboard
Change-Id: I82186f999e74be4aebd59d77666390a7d5e8ad81
Reviewed-on: https://gerrit.libreoffice.org/83923
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 7de9417d5f65d35227c7f80f6d587c2a56bde4e0)
Reviewed-on: https://gerrit.libreoffice.org/83982
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 1ee124423fc1..8faed20374e8 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -220,6 +220,7 @@ private:
bool mbCenter : 1; ///< center Text output
bool mbRight : 1; ///< right align Text output
bool mbEdgeBlending : 1;
+ bool mbIsComboboxDropdown : 1;
Link<ImplListBoxWindow*,void> maScrollHdl;
Link<LinkParamNone*,void> maSelectHdl;
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 4b19c42ad5c4..710b4a0bac3e 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -745,7 +745,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt )
case KEY_RETURN:
{
- if ((rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && IsInDropDown())
+ if (rNEvt.GetWindow() == m_pImpl->m_pSubEdit)
{
m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
bDone = true;
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index fb6da7b2c6e6..e87281447bf1 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -483,6 +483,7 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle )
mbCenter = ( nWinStyle & WB_CENTER );
mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE );
mbSort = ( nWinStyle & WB_SORT );
+ mbIsComboboxDropdown = ( nWinStyle & WB_DROPDOWN );
mbEdgeBlending = false;
// pb: #106948# explicit mirroring for calc
@@ -1633,7 +1634,9 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
mnCurrentPos = nSelect;
if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
{
- mbTravelSelect = true;
+ // tdf#129043 Correctly deliver events when changing values with arrow keys in combobox
+ if (mbIsComboboxDropdown && IsReallyVisible())
+ mbTravelSelect = true;
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
mbTravelSelect = false;
More information about the Libreoffice-commits
mailing list