diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-26 14:47:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-26 17:30:14 +0200 |
commit | 1354d0ffcabc6e7f78767e8cac1e8c127d4e4b6c (patch) | |
tree | 3b3bc52a8e8e6eb2a990df9b19bf3488a69ca622 /sw | |
parent | 42547b6472cad484bced8aa47ecadd6d21d587ac (diff) |
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.meeks@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; } } |