1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 03:45:56 +01:00

Draw a background in the playlist when there isn't a moodbar

This commit is contained in:
David Sansome 2012-05-27 21:53:38 +01:00
parent 74a83a2f7c
commit 37df0ec0b6

View File

@ -44,8 +44,11 @@ void MoodbarItemDelegate::paint(
const QModelIndex& index) const {
QPixmap pixmap = const_cast<MoodbarItemDelegate*>(this)->PixmapForIndex(
index, option.rect.size());
if (!pixmap.isNull()) {
painter->drawPixmap(option.rect, pixmap);
} else {
drawBackground(painter, option, index);
}
}