summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-25 13:24:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-28 11:21:33 +0200
commit3b7c4b60121ccbe8bd0890651c2c4dc5b425d61c (patch)
tree7f9819649c2f68e3a1470986296843ff7cdc4c54 /svtools
parent01746f163308b04dfce01370055f6fb33624b79d (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/+/115968 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit eb5b345172516b31ec43e226c242e536e93a3413) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115971 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueset.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index c9a94de237a1..1d961ad4ad32 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -425,6 +425,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;
}