vcl/source/treelist/iconviewimpl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 2af7baa30da250a6f6894175e9fda130554eb4ac Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Oct 4 19:46:45 2021 +0100 Commit: Xisco Fauli <xiscofa...@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 <xiscofa...@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 );