sw/source/uibase/utlui/content.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
New commits: commit f53dd906e79ab77f0ab4a421e47650a9cc4ce1d6 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Mon Nov 29 23:56:07 2021 -0900 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Wed Dec 1 19:18:42 2021 +0100 SwNavigator: make comment tracking work in content navigation view and respect comment tracking setting Change-Id: I93c50cd5e022512bd092fed0922e8a22bdc7b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126085 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 140b42c7af1a..d181182de36b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3840,17 +3840,18 @@ void SwContentTree::UpdateTracking() aContentAtPos.pFndTextAttr); return; } - // fields + // fields, comments if (SwField* pField = m_pActiveShell->GetCurField(); pField && - !(m_bIsRoot && m_nRootType != ContentTypeId::TEXTFIELD)) + !(m_bIsRoot && + m_nRootType != ContentTypeId::TEXTFIELD && + m_nRootType != ContentTypeId::POSTIT)) { - if (m_bFieldTracking) - { - ContentTypeId nContentTypeId = - pField->GetTypeId() == SwFieldTypesEnum::Postit ? ContentTypeId::POSTIT : - ContentTypeId::TEXTFIELD; + ContentTypeId nContentTypeId = + pField->GetTypeId() == SwFieldTypesEnum::Postit ? ContentTypeId::POSTIT : + ContentTypeId::TEXTFIELD; + if ((m_bFieldTracking && nContentTypeId == ContentTypeId::TEXTFIELD) || + (m_bCommentTracking && nContentTypeId == ContentTypeId::POSTIT)) lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, nContentTypeId, pField); - } return; } // table