From: Flavio Tordini Date: Thu, 27 Aug 2009 21:40:32 +0000 (+0200) Subject: Paint play icon only if there is a thumb X-Git-Tag: 0.6~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0b7c70de7a9b40e6f1483dcf78c9f2437d174a50;p=minitube Paint play icon only if there is a thumb --- diff --git a/src/playlist/PrettyItemDelegate.cpp b/src/playlist/PrettyItemDelegate.cpp index 9e0348d..59843fe 100644 --- a/src/playlist/PrettyItemDelegate.cpp +++ b/src/playlist/PrettyItemDelegate.cpp @@ -81,11 +81,13 @@ void PrettyItemDelegate::paintBody( QPainter* painter, const Video *video = videoPointer.data(); // thumb - painter->drawImage(QRect(0, 0, THUMB_WIDTH, THUMB_HEIGHT), video->thumbnail()); + if (!video->thumbnail().isNull()) { + painter->drawImage(QRect(0, 0, THUMB_WIDTH, THUMB_HEIGHT), video->thumbnail()); - // play icon overlayed on the thumb - if (isActive) - paintPlayIcon(painter); + // play icon overlayed on the thumb + if (isActive) + paintPlayIcon(painter); + } // time QString timeString;