Skip to content

Commit

Permalink
Improve use of m_pTrackModel
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Oct 1, 2024
1 parent 6c841bd commit 77847a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library/coverartdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ void CoverArtDelegate::paintItem(
QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index) const {
CoverInfo coverInfo = m_pTrackModel->getCoverInfo(index);
VERIFY_OR_DEBUG_ASSERT(m_pTrackModel) {
return;
}
CoverInfo coverInfo = m_pTrackModel->getCoverInfo(index);
bool drewPixmap = false;
if (coverInfo.hasImage()) {
VERIFY_OR_DEBUG_ASSERT(m_pCache) {
return;
}
const double scaleFactor = qobject_cast<QWidget*>(parent())->devicePixelRatioF();
const double scaleFactor = m_pTableView->devicePixelRatioF();
QPixmap pixmap = CoverArtCache::getCachedCover(
coverInfo,
static_cast<int>(option.rect.width() * scaleFactor));
Expand Down

0 comments on commit 77847a2

Please sign in to comment.