[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 5 08:28:56 UTC 2021


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

New commits:
commit 2af7baa30da250a6f6894175e9fda130554eb4ac
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 4 19:46:45 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Oct 5 10:28:24 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/+/122942
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

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 );


More information about the Libreoffice-commits mailing list