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
1 changed files with 3 additions and 0 deletions

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);
}
}