From cb549e48a8b8e23a89b608f63d9452e5bec83be7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 5 Sep 2022 17:09:29 +0100 Subject: Resolves: tdf#150797 page preview scrolling not updating position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8b495d755278ce850d69da8b7fb8588a4f111bd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139444 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/uibase/uiview/pview.cxx | 4 ++-- sw/source/uibase/uiview/viewport.cxx | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 6a5eb147e28d..f6db5bb9d928 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1399,6 +1399,8 @@ void SwPagePreview::ScrollHdl(weld::Scrollbar& rScrollbar, bool bHori) if(!GetViewShell()) return; + EndScrollHdl(rScrollbar, bHori); + if( !bHori && rScrollbar.get_scroll_type() == ScrollType::Drag && Help::IsQuickHelpEnabled() && @@ -1423,8 +1425,6 @@ void SwPagePreview::ScrollHdl(weld::Scrollbar& rScrollbar, bool bHori) QuickHelpFlags::Right|QuickHelpFlags::VCenter); } - else - EndScrollHdl(rScrollbar, bHori); } void SwPagePreview::EndScrollHdl(weld::Scrollbar& rScrollbar, bool bHori) diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 8e7a959dec58..9b7bb9120f04 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -677,14 +677,11 @@ IMPL_LINK(SwView, VertScrollHdl, weld::Scrollbar&, rScrollbar, void) if (rScrollbar.get_scroll_type() == ScrollType::Drag) m_pWrtShell->EnableSmooth( false ); + EndScrollHdl(rScrollbar, false); + if (!m_pWrtShell->GetViewOptions()->getBrowseMode() && rScrollbar.get_scroll_type() == ScrollType::Drag) { - // Here comment out again if it is not desired to scroll together: - // The end scrollhandler invalidate the FN_STAT_PAGE, - // so we don't must do it again. - EndScrollHdl(rScrollbar, false); - if ( !m_bWheelScrollInProgress && Help::IsQuickHelpEnabled() && m_pWrtShell->GetViewOptions()->IsShowScrollBarTips()) { @@ -737,8 +734,6 @@ IMPL_LINK(SwView, VertScrollHdl, weld::Scrollbar&, rScrollbar, void) } } } - else - EndScrollHdl(rScrollbar, false); if (rScrollbar.get_scroll_type() == ScrollType::Drag) m_pWrtShell->EnableSmooth( true ); -- cgit