From b97fb9f1a9ae7f4f7df8ad9f9ab07ed70bbbb6bc Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Thu, 22 Feb 2024 04:50:07 +0300 Subject: Update FileThumbnailView's grid upon finishing loading thumbnails Signed-off-by: Alexander Golubev (cherry picked from commit eed7134d3213d05a8afa96df56bbd1dfb1706d9d) --- src/gvcore/filethumbnailview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gvcore/filethumbnailview.cpp b/src/gvcore/filethumbnailview.cpp index 543fa78..a6a3a1a 100644 --- a/src/gvcore/filethumbnailview.cpp +++ b/src/gvcore/filethumbnailview.cpp @@ -389,6 +389,9 @@ void FileThumbnailView::stopThumbnailUpdate() { if (!d->mThumbnailLoadJob.isNull()) { d->mThumbnailLoadJob->kill(false); d->mThumbnailLoadJob=nullptr; + // The job loads image dimensions and this may add extra line to the descriptions, which + // may mess up the grid, even if the job is canceled, some items may be already updated. + arrangeItemsInGrid(); } } @@ -399,6 +402,8 @@ void FileThumbnailView::slotUpdateEnded() { d->mProgressWidget=0L; BusyLevelManager::instance()->setBusyLevel( this, BUSY_NONE ); + // Besides thumbnails the job loads image dimensions and this may mess up the grid + arrangeItemsInGrid(); } -- cgit v1.2.1