[vlc-commits] gui/qt: fix PLModel::isSupportedAction( ACTION_CLEAR, ... )
Filip Roséen
git at videolan.org
Sun Jul 24 20:39:14 CEST 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Sun Jul 24 15:17:26 2016 +0200| [c152a073b757422ea9e6d3984275180df1d72bf1] | committer: Francois 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: Francois Cartegnie <fcvlcdev at free.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c152a073b757422ea9e6d3984275180df1d72bf1
---
modules/gui/qt/components/playlist/playlist_model.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 9c1a902..1845e30 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -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:
More information about the vlc-commits
mailing list