diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-14 12:50:15 +0000 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2022-01-16 22:01:06 +0100 |
commit | 2e02d78f92b06c72d515240cf83e1a8f224b0ae3 (patch) | |
tree | 46299384684151e9416f68e79a777c07dcb0211a | |
parent | tdf#146375 Cannot rename user-defined categories in template manager (diff) | |
download | core-2e02d78f92b06c72d515240cf83e1a8f224b0ae3.tar.gz core-2e02d78f92b06c72d515240cf83e1a8f224b0ae3.zip |
tdf#136481 show the focus rect for the case nothing is yet selected
but the cursor is at pos 0
Change-Id: I7c94480bffdced23fe89d4e3ba0e729742247130
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128414
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4bdf28b404f90236d93ce207671f755a71f28496)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128430
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index ab7ed3fe45cf..e42a6eac94b8 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1296,12 +1296,16 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow ) { rFilterBox.grab_focus(); + if (rFilterBox.n_children()) + { + if (nSelPos != -1) + rFilterBox.set_cursor(nSelPos); + else + rFilterBox.set_cursor(0); + } // Select only after GrabFocus, so that the focus rectangle gets correct if (nSelPos != -1) - { - rFilterBox.set_cursor(nSelPos); rFilterBox.select(nSelPos); - } else rFilterBox.unselect_all(); |