summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-01-28 17:34:48 -0900
committerJim Raykowski <raykowj@gmail.com>2022-01-29 21:50:10 +0100
commitb0434f62c17b69e10caf05ad85a60f1bffdb5238 (patch)
tree6ee6aa43b92435c7bced988be4e6f4b9c87b4d46 /sw/source
parentf65188894e06db8c2e28e11ad6466a435220b0c4 (diff)
tdf#147041 Always show navigated heading at top of visible view area
Revert to pre commit 1df2581cfffc87386c6de7614793b2d664244e5a behavior Change-Id: I06fe630bf0c0e611351e0e9a56361a3028f207d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129129 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/utlui/content.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 9844a92ba774..0079e5b33e2b 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -5106,9 +5106,11 @@ void SwContentTree::GotoContent(const SwContent* pCnt)
rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
rView.GetEditWin().GrabFocus();
- // assure visible view area is at cursor position
- if (!m_pActiveShell->IsCursorVisible() && !m_pActiveShell->IsFrameSelected() &&
- !m_pActiveShell->IsObjSelected())
+ // Assure cursor is in visible view area.
+ // (tdf#147041) Always show the navigated outline at the top of the visible view area.
+ if (pCnt->GetParent()->GetType() == ContentTypeId::OUTLINE ||
+ (!m_pActiveShell->IsCursorVisible() && !m_pActiveShell->IsFrameSelected() &&
+ !m_pActiveShell->IsObjSelected()))
{
Point rPoint = m_pActiveShell->GetCursorDocPos();
rPoint.setX(0);