[vlc-commits] qml: right clicking selected items in table view should not reset selection
Pierre Lamot
git at videolan.org
Mon Sep 28 09:38:13 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed Sep 23 13:27:20 2020 +0200| [614b924ebcd1481e45add9c5caf8271ff738c93b] | committer: Pierre Lamot
qml: right clicking selected items in table view should not reset selection
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=614b924ebcd1481e45add9c5caf8271ff738c93b
---
modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index 52c2547b19..3e37fb5788 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -221,9 +221,11 @@ NavigableFocusScope {
acceptedButtons: Qt.RightButton | Qt.LeftButton
onClicked: {
- selectionDelegateModel.updateSelection( mouse.modifiers , view.currentIndex, index)
- view.currentIndex = rowModel.index
- lineView.forceActiveFocus()
+ if (mouse.button === Qt.LeftButton || !selectionDelegateModel.isSelected(root.model.index(index, 0))) {
+ selectionDelegateModel.updateSelection( mouse.modifiers , view.currentIndex, index)
+ view.currentIndex = rowModel.index
+ lineView.forceActiveFocus()
+ }
if (mouse.button === Qt.RightButton){
root.rightClick(lineView,rowModel, hoverArea.mapToGlobal(mouse.x,mouse.y) )
More information about the vlc-commits
mailing list