sw/source/uibase/utlui/content.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 51be46640a4987d839aace354ee8b5e85bdce684 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Sat Dec 17 12:10:59 2022 -0900 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Dec 18 17:05:02 2022 +0000 tdf#138587 Preserve doc view x position on go to content from the Writer Navigator. Change-Id: I55b05be037b4ce010fb0476f584921c7ecae79bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144392 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 6f6e7920faae..15ca21f54e7f 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5666,9 +5666,8 @@ void SwContentTree::GotoContent(const SwContent* pCnt) (!m_pActiveShell->IsCursorVisible() && !m_pActiveShell->IsFrameSelected() && !m_pActiveShell->IsObjSelected())) { - Point rPoint = m_pActiveShell->GetCursorDocPos(); - rPoint.setX(0); - rView.SetVisArea(rPoint); + Point aPoint(rView.GetVisArea().getX(), m_pActiveShell->GetCursorDocPos().getY()); + rView.SetVisArea(aPoint); } }