diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-03 16:44:35 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-04 15:12:36 +0100 |
commit | 50e345d50b72aad07776d4af343f41028640d83e (patch) | |
tree | 2bfa6a0985e214093d1bedf6a5fbcc41d183daac | |
parent | 217b9423e4bdabba096a9ab2440d796a69cdf5b5 (diff) |
Don't skip lines if only one row in the list
Mouse wheel emits delta > 1 so if we see only one row
but delta is 3 we skip then 2 rows.
Change-Id: I136788d38a189c061a55cba12eef05c7a4733820
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110379
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | vcl/source/treelist/svimpbox.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 186810ff84c9..7397305e0aba 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -293,6 +293,10 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) if( !nDelta ) return; + // when only one row don't skip lines + if (pScrollBar->GetPageSize() == 1) + nDelta = nDelta > 0 ? 1 : -1; + m_nFlags &= ~LBoxFlags::Filling; m_bInVScrollHdl = true; |