[vlc-commits] qml: deselect all when right clicked in empty area / footer in PlaylistListView
Fatih Uzunoglu
git at videolan.org
Tue Jan 12 13:20:46 UTC 2021
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Jan 8 00:36:48 2021 +0300| [afdf46b94e9551d6c3dfb6767270050c33971cfd] | committer: Pierre Lamot
qml: deselect all when right clicked in empty area / footer in PlaylistListView
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=afdf46b94e9551d6c3dfb6767270050c33971cfd
---
modules/gui/qt/playlist/qml/PlaylistListView.qml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index be9b1a385c..9ab6eb3dd4 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -320,8 +320,14 @@ Widgets.NavigableFocusScope {
onClicked: {
listView.forceActiveFocus()
- if( mouse.button === Qt.RightButton )
+
+ if ( mouse.button === Qt.LeftButton || mouse.button === Qt.RightButton ) {
+ root.model.deselectAll()
+ }
+
+ if ( mouse.button === Qt.RightButton ) {
contextMenu.popup(-1, this.mapToGlobal(mouse.x, mouse.y))
+ }
}
}
More information about the vlc-commits
mailing list