summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-23 11:37:09 +0000
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-25 14:03:20 +0100
commit6911ac40f668895089d4ae4de90edba95e283433 (patch)
tree20f1fd47e8f42aceb6bbd4fb7680e0e334c87d0b
parentUpdate git submodules (diff)
downloadcore-6911ac40f668895089d4ae4de90edba95e283433.tar.gz
core-6911ac40f668895089d4ae4de90edba95e283433.zip
tdf#137662 set focus in combo/list box on click
backport the part of commit d2f1cd004310b9ea6654d17fddc11cb08e884c90 Date: Fri Jun 26 20:57:29 2020 +0100 that sets the correct focus on click Change-Id: Ia053925f5e541642720892dfe2edc27995e84a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106414 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--include/svtools/editbrowsebox.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 5614659d0756..04c931d82fdd 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -339,6 +339,13 @@ namespace svt
public:
ComboBoxControl(vcl::Window* pParent);
+ virtual void GetFocus() override
+ {
+ if (m_xWidget)
+ m_xWidget->grab_focus();
+ InterimItemWindow::GetFocus();
+ }
+
weld::ComboBox& get_widget() { return *m_xWidget; }
// sets a link to call when the selection is changed by the user
@@ -400,6 +407,13 @@ namespace svt
public:
ListBoxControl(vcl::Window* pParent);
+ virtual void GetFocus() override
+ {
+ if (m_xWidget)
+ m_xWidget->grab_focus();
+ InterimItemWindow::GetFocus();
+ }
+
weld::ComboBox& get_widget() { return *m_xWidget; }
// sets a link to call when the selection is changed by the user