From e8ffe26c0621e5eaa94bab5d24651e9abd4ea178 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 15 Feb 2021 20:16:44 +0000 Subject: tdf#140387 grab focus to first panel widget on panel gaining focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise focus is getting lost in these currently mixed vcl+gtk widget panels. Change-Id: I6488ddfc98afdedb55bb3217f3877e96258dd65a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110955 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/ui/formdlg/dwfunctr.cxx | 2 ++ sc/source/ui/navipi/navipi.cxx | 2 ++ sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 1 + sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 1 + 4 files changed, 6 insertions(+) (limited to 'sc') diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 436fcff51708..e5adb6859be2 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -70,6 +70,8 @@ ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const css::uno::Referenceset_active(0); SelComboHdl(*xCatBox); + + m_pInitialFocusWidget = xCatBox.get(); } /************************************************************************* diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 4b7247657e10..5d3e7366f6f6 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -417,6 +417,8 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) SetListMode(eNavMode); aExpandedSize = GetOptimalSize(); + + m_pInitialFocusWidget = m_xEdCol.get(); } void ScNavigatorDlg::UpdateSheetLimits() diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 24396c7c6ae6..702845cb6593 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -73,6 +73,7 @@ AlignmentPropertyPanel::AlignmentPropertyPanel( , mpBindings(pBindings) { Initialize(); + m_pInitialFocusWidget = &mxMFLeftIndent->get_widget(); } AlignmentPropertyPanel::~AlignmentPropertyPanel() diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 12fc841dc6a1..bd7069e34d26 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -54,6 +54,7 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel( , mpBindings(pBindings) { Initialize(); + m_pInitialFocusWidget = mxLbCategory.get(); } NumberFormatPropertyPanel::~NumberFormatPropertyPanel() -- cgit v1.2.3