sw/source/uibase/docvw/edtwin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1354d0ffcabc6e7f78767e8cac1e8c127d4e4b6c Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri May 26 14:47:58 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri May 26 17:30:14 2023 +0200 Related: tdf#155507 Only need this invalidate if using header/footer controls which is implied from the IsUseHeaderFooterMenu option Change-Id: I0f9a32ed1a3e0e5e277c33c45206757d133d92e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152330 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 1e07a0f4fcdc..147ae7b1d427 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2966,9 +2966,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !bActive ) { - // When in Hide-Whitespace mode, we don't want header - // and footer controls. - if (!rSh.GetViewOptions()->IsHideWhitespaceMode()) + // HeaderFooter menu implies header/footer controls, so only do this with IsUseHeaderFooterMenu enabled. + // But, additionally, when in Hide-Whitespace mode, we don't want those controls. + if (rSh.GetViewOptions()->IsUseHeaderFooterMenu() && !rSh.GetViewOptions()->IsHideWhitespaceMode()) { SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint()); const bool bWasInHeader = aPam.GetPoint()->GetNode().FindHeaderStartNode() != nullptr; @@ -2993,7 +2993,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // 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() ) + && !Application::IsHeadlessModeEnabled() ) return; } }