vcl/source/treelist/svimpbox.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 7b4fa321200263f9aefb36c7b3b163b9d3116de6 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Feb 3 16:17:29 2021 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Feb 4 15:11:54 2021 +0100 Invalidate IconView on scroll if has only one row When we have only one row the page size for scrollbar is set to 1 so delta is always 1. This prevents from invalidation when scrolling up using a scrollbar button and results in artifacts on the screen. Change-Id: I92ed0133450ba459e19b575d8c52d059464b1e33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110377 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 7d9bfbcfefb3..186810ff84c9 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -305,7 +305,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) if( nDelta > 0 ) { - if( nDelta == 1 ) + if( nDelta == 1 && pScrollBar->GetPageSize() > 1) CursorDown(); else PageDown( static_cast<sal_uInt16>(nDelta) ); @@ -313,7 +313,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) else { nDelta *= -1; - if( nDelta == 1 ) + if( nDelta == 1 && pScrollBar->GetPageSize() > 1) CursorUp(); else PageUp( static_cast<sal_uInt16>(nDelta) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits