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

gui/qt: fix PLModel::isSupportedAction( ACTION_CLEAR, ... )

A user should be presented by the option to clear the playlist, as long
as;

    - the playlist is allowed to be changed by the user, and;
    - we have at least one entity inside of it.

This commit changes the previous logic so that it follows the reasoning
above.
Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent 02ac2d7e
......@@ -1046,7 +1046,7 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons
case ACTION_RENAMENODE:
return ( index != rootIndex() ) && !isLeaf( index ) && !item->readOnly();
case ACTION_CLEAR:
return rowCount() && !item->readOnly();
return canEdit() && rowCount();
case ACTION_ENQUEUEFILE:
case ACTION_ENQUEUEDIR:
case ACTION_ENQUEUEGENERIC:
......
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