[Libreoffice-commits] core.git: svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 19 09:08:48 UTC 2021


 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |   19 +++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 5dea5dbb99b1925b2ecc2b2882d8cef30fe50d27
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 18 16:05:50 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 19 10:08:01 2021 +0100

    Resolves: tdf#135617 grab focus to widget matching the line spacing state
    
    instead of leaving it at the first widget in the popup
    
    Change-Id: I0bc4c72f7972e339cd28cd6368a4784cdb11275f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109561
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 2efea182c0d4..34ce9159d268 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -96,7 +96,24 @@ ParaLineSpacingControl::ParaLineSpacingControl(SvxLineSpacingToolBoxControl* pCo
 
 void ParaLineSpacingControl::GrabFocus()
 {
-    mxSpacing1Button->grab_focus();
+    switch (mxLineDist->get_active())
+    {
+        case LLINESPACE_1:
+            mxSpacing1Button->grab_focus();
+            break;
+        case LLINESPACE_115:
+            mxSpacing115Button->grab_focus();
+            break;
+        case LLINESPACE_15:
+            mxSpacing15Button->grab_focus();
+            break;
+        case LLINESPACE_2:
+            mxSpacing2Button->grab_focus();
+            break;
+        default:
+            mxLineDist->grab_focus();
+            break;
+    }
 }
 
 ParaLineSpacingControl::~ParaLineSpacingControl()


More information about the Libreoffice-commits mailing list