From ba396ea73c2e563d1363038c159149d0a53e15a9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 4 Dec 2012 15:45:46 +0100 Subject: [PATCH] * ContextMenu: don't offer an album link when there's no album set. --- src/libtomahawk/ContextMenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/ContextMenu.cpp b/src/libtomahawk/ContextMenu.cpp index 9260716b7..8c460535d 100644 --- a/src/libtomahawk/ContextMenu.cpp +++ b/src/libtomahawk/ContextMenu.cpp @@ -109,7 +109,8 @@ ContextMenu::setQueries( const QList& queries ) if ( m_supportedActions & ActionPage && itemCount() == 1 ) { m_sigmap->setMapping( addAction( tr( "&Go to \"%1\"" ).arg( m_queries.first()->track() ) ), ActionTrackPage ); - m_sigmap->setMapping( addAction( tr( "Go to \"%1\"" ).arg( m_queries.first()->album() ) ), ActionAlbumPage ); + if ( !m_queries.first()->album().isEmpty() ) + m_sigmap->setMapping( addAction( tr( "Go to \"%1\"" ).arg( m_queries.first()->album() ) ), ActionAlbumPage ); m_sigmap->setMapping( addAction( tr( "Go to \"%1\"" ).arg( m_queries.first()->artist() ) ), ActionArtistPage ); }