diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-25 13:24:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-25 16:19:07 +0200 |
commit | 2b838b3b6aa5a014591e86b1736f82908076ff65 (patch) | |
tree | 439d552be1b7041345ab0787adf246ca5e22e822 /svtools/source | |
parent | ef88aa5e7400769c0a17c28e66b1ee957c2f667e (diff) |
tdf#142479 on 'return' select the entry the cursor is in before calling Select
Change-Id: Ic11f8a12c93d1999dd6fbe555b9823660eb703d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116101
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/control/valueset.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 821462879b82..c60e557fa140 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -419,6 +419,14 @@ bool ValueSet::KeyInput( const KeyEvent& rKeyEvent ) case KEY_RETURN: if (GetStyle() & WB_NO_DIRECTSELECT) { + // tdf#142479 on return select the entry the cursor is in + // before calling Select + if (nCurPos != VALUESET_ITEM_NONEITEM) + { + const sal_uInt16 nItemId = GetItemId(nCurPos); + if (nItemId != mnSelItemId) + SelectItem(nItemId); + } Select(); break; } |