diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-09-25 08:30:36 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-28 14:02:49 +0000 |
commit | 41ef50797baf7dbd05ebda647ae591e8ed754987 (patch) | |
tree | ec1956e28be403d423f856124dd9e4fff2a9a9e2 /sw/source/uibase/docvw | |
parent | ebcbc970f8d0ecbba8c6d7e7c2a1b977d63bc2fb (diff) |
editeng: invalidate everything only when toggling header-footer edit
The repaining of the full screen can be costly in certain
cases. Here we avoid it altogether if we don't switch
between header/footer editing and document-body editing.
If for whatever reason this results in some regression,
we should then avoid the invalidation for the Online
version only. The change is unconditional because,
in theory, it shouldn't cause regression, and tests
pass.
Change-Id: I05467c98b5fa4857b94f6742004f98dca3799826
Reviewed-on: https://gerrit.libreoffice.org/29272
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/docvw')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 942a01d337cb..ad44e7abeca6 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2920,10 +2920,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) !(bWasInFooter && eControl == Footer)) { rSh.SetShowHeaderFooterSeparator(eControl, !rSh.IsShowHeaderFooterSeparator(eControl)); - } - // Repaint everything - Invalidate(); + // Repaint everything + Invalidate(); + } } } else @@ -2934,10 +2934,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rSh.SetShowHeaderFooterSeparator( Footer, eControl == Footer ); if ( !rSh.IsHeaderFooterEdit() ) + { rSh.ToggleHeaderFooterEdit(); - // Repaint everything - rSh.GetWin()->Invalidate(); + // Repaint everything + rSh.GetWin()->Invalidate(); + } } } else |