mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
remove styleoption selected before painting the text to avoid two selection boxes
This commit is contained in:
@@ -173,14 +173,16 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
}
|
||||
else if ( type == SourcesModel::StaticPlaylist || type == SourcesModel::CategoryAdd )
|
||||
{
|
||||
o.state &= QStyle::State_Selected;
|
||||
o.showDecorationSelected = false;
|
||||
if ( !m_expandedMap.contains( index) )
|
||||
{
|
||||
QStyledItemDelegate::paint( painter, option, index );
|
||||
QStyledItemDelegate::paint( painter, o, index );
|
||||
return;
|
||||
}
|
||||
|
||||
// Let Qt paint the original item. We add our stuff after it
|
||||
QStyleOptionViewItem o = option;
|
||||
// QStyleOptionViewItem o = option;
|
||||
o.rect.adjust( 0, 0, 0, - option.rect.height() + m_expandedMap.value( index )->originalSize().height() );
|
||||
QStyledItemDelegate::paint( painter, o, index );
|
||||
|
||||
|
Reference in New Issue
Block a user