sw/source/uibase/utlui/content.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
New commits: commit 6caee83a16690d0a664c80ebe42c5b739afe7567 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Mon Nov 29 23:56:07 2021 -0900 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Sun Dec 5 17:54:45 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> (cherry picked from commit f53dd906e79ab77f0ab4a421e47650a9cc4ce1d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126229 diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 44c610341fea..380af4aba7a4 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