sw/source/core/crsr/crsrsh.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
New commits: commit c9581d7ada7d6a0e62653bdfa1e419ede6324970 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: Fri May 26 14:36:25 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/+/152301 Tested-by: Jenkins Reviewed-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 aacc4da647b5..c34827f092d8 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;