From af576cf1e7cbd59ec9b63ab6b0e2ba60de0c3014 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 16 Mar 2011 05:18:00 +0100 Subject: [PATCH] * This should fix candy striping in TrackViews. --- src/libtomahawk/playlist/playlistitemdelegate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/playlist/playlistitemdelegate.cpp b/src/libtomahawk/playlist/playlistitemdelegate.cpp index c408dbb9f..65476c516 100644 --- a/src/libtomahawk/playlist/playlistitemdelegate.cpp +++ b/src/libtomahawk/playlist/playlistitemdelegate.cpp @@ -54,6 +54,7 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti if ( !item || item->query().isNull() ) return; + painter->save(); if ( item->query()->results().count() ) painter->setOpacity( item->query()->results().at( 0 )->score() ); else @@ -64,7 +65,6 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti if ( item->isPlaying() ) { - painter->save(); // painter->setRenderHint( QPainter::Antialiasing ); { @@ -92,11 +92,11 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti painter->setPen( pen ); painter->drawRoundedRect( r, 3.0, 3.0 ); } - - painter->restore(); } else { QStyledItemDelegate::paint( painter, option, index ); } + + painter->restore(); }