1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Fixed artist links for similar tracks.

This commit is contained in:
Christian Muehlhaeuser
2012-05-19 06:40:30 +02:00
parent 5d977d1ca7
commit 2e0d6b0874

View File

@@ -343,9 +343,12 @@ AlbumItemDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const
else if ( event->type() == QEvent::MouseButtonRelease )
{
AlbumItem* item = m_model->sourceModel()->itemFromIndex( m_model->mapToSource( index ) );
if ( !item || item->album().isNull() || item->album()->artist().isNull() )
if ( !item )
return false;
if ( !item->query().isNull() )
ViewManager::instance()->show( Tomahawk::Artist::get( item->query()->artist() ) );
else if ( !item->album().isNull() && !item->album()->artist().isNull() )
ViewManager::instance()->show( item->album()->artist() );
event->accept();