sw/source/uibase/docvw/AnnotationWin2.cxx | 2 ++ sw/source/uibase/utlui/content.cxx | 12 ++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit 6573d0ed5479fd543303e82ec23195bdc101ceb4 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Mon Sep 23 07:16:39 2024 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Wed Sep 25 07:05:46 2024 +0200 Resolves tdf#152297 Track comments in the Navigator also by focus inside the comment box Change-Id: I7ced30c606d89a11012e21bfce18939b7660f038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173824 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index f786c1f038f5..437ee6baa220 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -991,6 +991,8 @@ void SwAnnotationWin::ActivatePostIt() //ctrl+tab cycles between text and button so we don't waste time searching //thousands of SwAnnotationWins SetStyle(GetStyle() | WB_DIALOGCONTROL); + + mrView.GetDocShell()->Broadcast(SfxHint(SfxHintId::SwNavigatorUpdateTracking)); } void SwAnnotationWin::DeactivatePostIt() diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index b2571a7a68ff..5b7416b9bbcf 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4499,6 +4499,18 @@ void SwContentTree::UpdateTracking() lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, eCntTypeId, pField); return; } + if (SwPostItMgr* pPostItMgr = m_pActiveShell->GetPostItMgr(); + pPostItMgr && pPostItMgr->HasActiveAnnotationWin() + && !(m_bIsRoot && m_nRootType != ContentTypeId::POSTIT)) + { + if (mTrackContentType[ContentTypeId::POSTIT]) + { + if (const SwField* pField = pPostItMgr->GetActiveSidebarWin()->GetPostItField()) + lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, ContentTypeId::POSTIT, + pField); + } + return; + } // table if (m_pActiveShell->IsCursorInTable() && !(m_bIsRoot && m_nRootType != ContentTypeId::TABLE))