summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-11-18 12:45:44 -0900
committerJim Raykowski <raykowj@gmail.com>2021-11-20 10:23:14 +0100
commit40b40b74aae7e2a98dc964286baf499ecd1ae10b (patch)
treeae6285bc88492ae2c8fed66b08bf5f30cfea8cb3
parent2aa7aa564f8c8f7d1cd520b3e2d198a17e423a37 (diff)
SwNavigator: fall thru to outline tracking when section tracking is off
and the last GotoContent is not the current section Change-Id: I762163f82f2a376f04ce6fcb1c001fde6544e84d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125510 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 8b5c13ffb088..36686253ff83 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3869,9 +3869,21 @@ void SwContentTree::UpdateTracking()
!(m_bIsRoot && m_nRootType != ContentTypeId::REGION))
{
if (m_bSectionTracking)
+ {
lcl_SelectByContentTypeAndName(this, *m_xTreeView, SwResId(STR_CONTENT_TYPE_REGION),
pSection->GetSectionName());
- return;
+ return;
+ }
+ else
+ {
+ // prevent fall thru to outline tracking when section tracking is off and the last
+ // GotoContent is the current section
+ if (m_nLastSelType == ContentTypeId::REGION &&
+ m_xTreeView->get_selected_text() == pSection->GetSectionName())
+ return;
+ }
+ // fall thru to outline tracking when section tracking is off and the last GotoContent
+ // is not the current section
}
}
// outline
@@ -5163,7 +5175,7 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
{
m_nLastGotoContentWasOutlinePos = SwOutlineNodes::npos;
lcl_AssureStdModeAtShell(m_pActiveShell);
- switch(pCnt->GetParent()->GetType())
+ switch(m_nLastSelType = pCnt->GetParent()->GetType())
{
case ContentTypeId::TEXTFIELD:
{