diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-18 16:05:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-19 10:08:01 +0100 |
commit | 5dea5dbb99b1925b2ecc2b2882d8cef30fe50d27 (patch) | |
tree | 88ba920cb06581385eed68645500ffec446c5740 /svx | |
parent | eb4fe68e21868c066b68fb399f5ec0c207b0d4ef (diff) |
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@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
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() |