Skip to content

Commit

Permalink
Don't look up cover infos for not visible covers
Browse files Browse the repository at this point in the history
Co-authored-by: ronso0 <[email protected]>
  • Loading branch information
daschuer and ronso0 authored Oct 4, 2024
1 parent 18d556d commit bcd5d04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/library/coverartdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ void CoverArtDelegate::slotInhibitLazyLoading(
const int width = static_cast<int>(m_pTableView->columnWidth(m_column) * scaleFactor);

for (int row : std::as_const(m_cacheMissRows)) {
QModelIndex index = m_pTableView->model()->index(row, m_column);
CoverInfo coverInfo = m_pTrackModel->getCoverInfo(index);
QRect rect = m_pTableView->visualRect(index);
const QModelIndex index = m_pTableView->model()->index(row, m_column);
const QRect rect = m_pTableView->visualRect(index);
if (rect.intersects(m_pTableView->rect())) {
const CoverInfo coverInfo = m_pTrackModel->getCoverInfo(index);
requestUncachedCover(coverInfo, width, row);
}
}
Expand Down

0 comments on commit bcd5d04

Please sign in to comment.