vcl/source/treelist/iconviewimpl.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5a930d4b33e6b5e6642c936cb643c2c5605d6110
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Oct 4 19:46:45 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Oct 4 21:42:28 2021 +0200

    Resolves: tdf#143391 scrolling by an entry height taller than visible area
    
    leads to use of a rectangle with a negative height. Drop the attempted
    optimization, of reducing the area to copy to the min required, if the
    area is already shorter than the height of the area to scroll.
    
    Change-Id: Ic17d3d017f5280d1f6b655a2fc61627f512849cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123065
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/treelist/iconviewimpl.cxx 
b/vcl/source/treelist/iconviewimpl.cxx
index 3b2b370ab53d..319a0d7c899e 100644
--- a/vcl/source/treelist/iconviewimpl.cxx
+++ b/vcl/source/treelist/iconviewimpl.cxx
@@ -46,7 +46,8 @@ void IconViewImpl::CursorUp()
     m_pView->PaintImmediately();
     m_pStartEntry = pPrevFirstToDraw;
     tools::Rectangle aArea( GetVisibleArea() );
-    aArea.AdjustBottom( -nEntryHeight );
+    if (aArea.GetHeight() > nEntryHeight)
+        aArea.AdjustBottom(-nEntryHeight);
     m_pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
     m_pView->PaintImmediately();
     ShowCursor( true );

Reply via email to