sw/source/uibase/docvw/AnnotationWin2.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit e246d070d7ee3859df0090077e1071e897c453b5 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Thu Aug 7 22:06:00 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Fri Aug 8 09:04:56 2025 +0200 tdf#167775 writer doc with lots of comments slow avoid some unnecessary revalidation work when scrolling Change-Id: I34db49c5611f643e702e1966027876ca1dc3b38e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189139 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index e1cd877577b8..11e1cb6f2d28 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -525,6 +525,9 @@ void SwAnnotationWin::Rescale() MapMode aMode = GetParent()->GetMapMode(); aMode.SetOrigin( Point() ); + // Avoid re-initialising state unless something has changed to invalidate it. speeds up scrolling. + if (aMode == GetMapMode()) + return; SetMapMode( aMode ); mxSidebarTextControl->SetMapMode( aMode );