diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-05 17:09:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-05 22:01:58 +0200 |
commit | cb549e48a8b8e23a89b608f63d9452e5bec83be7 (patch) | |
tree | 8315655f05307873ffa7ea0137d76dc06db000e4 | |
parent | 16ed6110313cae310799a82294fc566ce75855a4 (diff) |
Resolves: tdf#150797 page preview scrolling not updating position
Change-Id: I8b495d755278ce850d69da8b7fb8588a4f111bd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139444
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 4 | ||||
-rw-r--r-- | 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 ); |