From 0b7c70de7a9b40e6f1483dcf78c9f2437d174a50 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Thu, 27 Aug 2009 23:40:32 +0200 Subject: [PATCH] Paint play icon only if there is a thumb --- src/playlist/PrettyItemDelegate.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; -- 2.39.5