sw/source/core/crsr/crsrsh.cxx |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 643c6b9a96020d5498d981c7ab081226415ab016
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri May 26 10:31:16 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue May 30 17:09:02 2023 +0200

    tdf#155507 don't redraw numbering when cursor enters it, if...
    
    "field shadings" are turned off and so the new output would be the same
    as it already is. Which removes a potential source of whole document
    invalidations in a multi-user collaborative scenario where participants
    may be casually clicking around the place with an expectation that it
    has limited effect on the other participants
    
    Change-Id: I2fb51ba3358bfc920aa2bff3593a0dd46f287100
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152229
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 03cecdbbd8bf..15c0dc1a6409 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -391,12 +391,18 @@ void SwCursorShell::MarkListLevel( const OUString& 
sListId,
     if (sListId == m_sMarkedListId && nListLevel == m_nMarkedListLevel)
         return;
 
-    if ( !m_sMarkedListId.isEmpty() )
-        mxDoc->MarkListLevel( m_sMarkedListId, m_nMarkedListLevel, false );
-
-    if ( !sListId.isEmpty() )
-    {
-        mxDoc->MarkListLevel( sListId, nListLevel, true );
+    // Writer redraws the "marked" list with the field shading, if there
+    // is no field shading then the marked list would be redrawn for no
+    // visually identifiable reason, so skip the mark if field shadings
+    // are disabled.
+    const bool bVisuallyMarked(GetViewOptions()->IsFieldShadings());
+    if (bVisuallyMarked)
+    {
+        if ( !m_sMarkedListId.isEmpty() )
+            mxDoc->MarkListLevel( m_sMarkedListId, m_nMarkedListLevel, false );
+
+        if ( !sListId.isEmpty() )
+            mxDoc->MarkListLevel( sListId, nListLevel, true );
     }
 
     m_sMarkedListId = sListId;

Reply via email to