summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2024-09-23 07:16:39 -0800
committerJim Raykowski <raykowj@gmail.com>2024-09-25 07:05:46 +0200
commit6573d0ed5479fd543303e82ec23195bdc101ceb4 (patch)
tree4ecdfa586591fd1f15ab6447fc5b8704c24995fc
parenta3b0ef4088183c4a3b2ec3fef08ef91314eaef54 (diff)
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 <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx12
2 files changed, 14 insertions, 0 deletions
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))