summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-02-03 16:17:29 +0100
committerJan Holesovsky <kendy@collabora.com>2021-03-02 11:22:00 +0100
commit6216f51febc107cd093d1e3a09d1bf270cfb0ded (patch)
tree6c9adb15962e3d5498ad41d0bc5da7c5d3956f45 /vcl/source
parentb72e2d40f42b37157be6998d2624670ac59ae30d (diff)
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@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111656 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/treelist/svimpbox.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 5ca02e42ee74..72d05e61d35c 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -325,7 +325,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) );
@@ -333,7 +333,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) );