1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 20:34:22 +02:00

Update editor geometry correctly for download buttons in GridItemDelegate.

This commit is contained in:
Christian Muehlhaeuser
2016-04-14 16:07:36 +02:00
committed by Dominik Schmidt
parent af459afb0b
commit 85657e40a6
2 changed files with 2 additions and 3 deletions

View File

@@ -940,9 +940,9 @@ GridItemDelegate::updateEditorGeometry( QWidget* editor, const QStyleOptionViewI
comboBox->resize( option.rect.size() - QSize( 8, 0 ) );
comboBox->move( option.rect.x() + 4, option.rect.y() );
if ( m_downloadDropDownRects.contains( index ) )
if ( m_buyButtonRects.contains( index ) )
{
editor->setGeometry( m_downloadDropDownRects.value( index ) );
editor->setGeometry( m_buyButtonRects.value( index ) );
}
if ( !comboBox->property( "shownPopup" ).toBool() )

View File

@@ -104,7 +104,6 @@ private:
mutable QHash< QPersistentModelIndex, QRect > m_artistNameRects;
mutable QHash< QPersistentModelIndex, QRect > m_albumNameRects;
mutable QHash< QPersistentModelIndex, QRect > m_buyButtonRects;
mutable QHash< QPersistentModelIndex, QRect > m_downloadDropDownRects;
mutable QHash< QPersistentModelIndex, QSharedPointer< Tomahawk::PixmapDelegateFader > > m_covers;
QPersistentModelIndex m_hoverIndex;