Commit b0445dcd authored by Filip Roséen's avatar Filip Roséen Committed by François Cartegnie

gui/qt: clean PLModel::isSupportedAction( ACTION_ADDTOPLAYLIST, ... )

A user should be able to add something to the playlist as long as we
are not invoking the action upon an item that is already there,
as such; checking the return-value of getPLRootType() is enough.

This commit removes the redundant check that follow, and also makes it
clear that we would never fall-through to ACTION_SORT.
Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent 6e17d45c
......@@ -1008,9 +1008,7 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons
{
case ACTION_ADDTOPLAYLIST:
/* Only if we are not already in Current Playing */
if ( getPLRootType() == ROOTTYPE_CURRENT_PLAYING ) return false;
if( index != rootIndex() )
return ( item->id( PLAYLIST_ID ) != THEPL->p_playing->i_id );
return getPLRootType() != ROOTTYPE_CURRENT_PLAYING;
case ACTION_SORT:
return rowCount();
case ACTION_PLAY:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment