summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/edtwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/docvw/edtwin.cxx')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index c90f73542edf..0cf38b1632b2 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2837,10 +2837,17 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!(bWasInHeader && eControl == Header) &&
!(bWasInFooter && eControl == Footer))
{
- rSh.SetShowHeaderFooterSeparator(eControl, !rSh.IsShowHeaderFooterSeparator(eControl));
+ const bool bSeparatorWasVisible = rSh.IsShowHeaderFooterSeparator(eControl);
+ rSh.SetShowHeaderFooterSeparator(eControl, !bSeparatorWasVisible);
// Repaint everything
Invalidate();
+
+ // If the control had not been showing, do not return to 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() )
+ return;
}
}
}