summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/edtwin.cxx
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2020-06-17 09:00:33 +0300
committerJustin Luth <justin_luth@sil.org>2020-06-17 09:00:11 +0200
commitc3cf3e908add6b6617eb0ee12385fbd8a70a9887 (patch)
tree1e5dd2c703df8a36f2f251167037ef12d1d68714 /sw/source/uibase/docvw/edtwin.cxx
parentd195f11fc0a9ca5a3974cd9814d64966120df174 (diff)
tdf#134023 sw ui: stay at footer ONLY when showing control
This adds a missing piece to LO 6.4's commit 342a5890dbcddccb4013e201e3ff3d9e6967e733 That tdf#84929 commit message suggested: One additional limitation could be added to only apply this if it is dealing with the footer, since in the case of a header there would be no screen-jump. and this bug report shows why that is necessary. I'm not sure why I didn't apply that immediately. Perhaps to help identify situations where the entire concept might be bad? Change-Id: Icea861bec45262eed88c38bb7eea910289c06870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96487 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/uibase/docvw/edtwin.cxx')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 132930631cf5..2a2d6634a0ea 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2821,10 +2821,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// Repaint everything
Invalidate();
- // If the control had not been showing, do not return to the cursor position,
+ // tdf#84929. If the footer control had not been showing, do not change the cursor position,
// because the user may have scrolled to turn on the separator control and
- // if the cursor is now off-screen, then the user would need to scroll back again to use the control.
- if ( !bSeparatorWasVisible && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && !Application::IsHeadlessModeEnabled() )
+ // if the cursor cannot be positioned on-screen, then the user would need to scroll back again to use the control.
+ // This should only be done for the footer. The cursor can always be re-positioned near the header. tdf#134023.
+ if ( eControl == FrameControlType::Footer && !bSeparatorWasVisible
+ && rSh.GetViewOptions()->IsUseHeaderFooterMenu() && !Application::IsHeadlessModeEnabled() )
return;
}
}