summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2017-09-16 17:54:43 -0800
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-11-07 10:26:16 +0100
commit33021ea5c6a5c7aebd4f11ec5e2b4502a3fbfd7f (patch)
treeb8337d83d53cc670d4f8d82bfdf86a9fd525c592 /sw/source/uibase/utlui
parent19f01900728fb77ec050e70c4fbd1129f6cddef4 (diff)
tdf#112435 Scroll to navigated position
Force scroll to position of navigation when navigating to inactive document using Navigator. Change-Id: I8671973f5fdb5f4158a7795bf0b3381db867d57a Reviewed-on: https://gerrit.libreoffice.org/44330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/content.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 5cbae839c1a2..f7c6cc627f39 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3504,6 +3504,14 @@ void SwContentTree::GotoContent(SwContent* pCnt)
rView.StopShellTimer();
rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
rView.GetEditWin().GrabFocus();
+
+ // force scroll to cursor position when navigating to inactive document
+ if(!bSel)
+ {
+ Point rPoint = m_pActiveShell->GetCursorDocPos();
+ rPoint.setX(0);
+ rView.SetVisArea(rPoint);
+ }
}
// Now even the matching text::Bookmark