[Libreoffice-commits] core.git: vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 4 14:12:46 UTC 2021
vcl/source/treelist/svimpbox.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7b4fa321200263f9aefb36c7b3b163b9d3116de6
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Feb 3 16:17:29 2021 +0100
Commit: Szymon Kłos <szymon.klos at 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.klos at 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) );
More information about the Libreoffice-commits
mailing list