summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
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);