1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 01:09:42 +01: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,10 +343,13 @@ 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;
ViewManager::instance()->show( item->album()->artist() );
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();
return true;