1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-07 17:42:35 +02:00

* Don't offer a play action if the user selected multiple items.

This commit is contained in:
Christian Muehlhaeuser 2011-06-24 08:18:13 +02:00
parent 903617fd50
commit 3f4140e023

View File

@ -58,7 +58,7 @@ ContextMenu::setQueries( const QList<Tomahawk::query_ptr>& queries )
m_queries.clear();
m_queries << queries;
if ( m_supportedActions & ActionPlay )
if ( m_supportedActions & ActionPlay && itemCount() == 1 )
m_sigmap->setMapping( addAction( tr( "&Play" ) ), ActionPlay );
if ( m_supportedActions & ActionQueue )
@ -102,7 +102,7 @@ ContextMenu::setAlbums( const QList<Tomahawk::album_ptr>& albums )
m_albums.clear();
m_albums << albums;
if ( m_supportedActions & ActionPlay )
if ( m_supportedActions & ActionPlay && itemCount() == 1 )
m_sigmap->setMapping( addAction( tr( "&Play" ) ), ActionPlay );
if ( m_supportedActions & ActionQueue )
@ -141,7 +141,7 @@ ContextMenu::setArtists( const QList<Tomahawk::artist_ptr>& artists )
m_artists.clear();
m_artists << artists;
if ( m_supportedActions & ActionPlay )
if ( m_supportedActions & ActionPlay && itemCount() == 1 )
m_sigmap->setMapping( addAction( tr( "&Play" ) ), ActionPlay );
if ( m_supportedActions & ActionQueue )