mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Use displayQuery for more readable code.
This commit is contained in:
@@ -685,34 +685,20 @@ TrackView::mousePressEvent( QMouseEvent* event )
|
|||||||
{
|
{
|
||||||
case PlayableModel::Artist:
|
case PlayableModel::Artist:
|
||||||
{
|
{
|
||||||
if ( item->query()->numResults() )
|
ViewManager::instance()->show( Artist::get( item->query()->displayQuery()->artist() ) );
|
||||||
{
|
|
||||||
ViewManager::instance()->show( item->query()->results().first()->artist() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ViewManager::instance()->show( Artist::get( item->query()->artist() ) );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case PlayableModel::Album:
|
case PlayableModel::Album:
|
||||||
{
|
{
|
||||||
if ( item->query()->numResults() )
|
artist_ptr artist = Artist::get( item->query()->displayQuery()->artist() );
|
||||||
{
|
ViewManager::instance()->show( Album::get( artist, item->query()->displayQuery()->album() ) );
|
||||||
ViewManager::instance()->show( item->query()->results().first()->album() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
artist_ptr artist = Artist::get( item->query()->artist() );
|
|
||||||
ViewManager::instance()->show( Album::get( artist, item->query()->album() ) );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case PlayableModel::Track:
|
case PlayableModel::Track:
|
||||||
{
|
{
|
||||||
ViewManager::instance()->show( item->query() );
|
ViewManager::instance()->show( item->query()->displayQuery() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user