sw/source/uibase/docvw/edtwin.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 41ef50797baf7dbd05ebda647ae591e8ed754987
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Sun Sep 25 08:30:36 2016 -0400

    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 <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 942a01d..ad44e7a 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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to