From 5756fe16c3f6d6ef5b3bcf6c6920ab874a2bfc9d Mon Sep 17 00:00:00 2001
From: Owen <owenca@users.noreply.github.com>
Date: Sat, 29 Apr 2017 10:31:55 +0000
Subject: [PATCH 3/3] Tracker: Fix Shift+click multi-selection not being
disabled.
Using BFilePanel with multi-selection turned off does not prevent
multi-selection by SHIFT-click. Traced the bug to
BPoseView::AddRemoveSelectionRange(), and the safest fix is to not
touching the boolean extendSelection but to just add the test for
fMultipleSelection to the if block that handles B_SHIFT_KEY.
Fixes #13462.
---
src/kits/tracker/PoseView.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kits/tracker/PoseView.cpp b/src/kits/tracker/PoseView.cpp
index 6bddd05..fa2a3f3 100644
a
|
b
|
BPoseView::AddRemoveSelectionRange(BPoint where, bool extendSelection,
|
7939 | 7939 | if (pose == fSelectionPivotPose && !extendSelection) |
7940 | 7940 | return; |
7941 | 7941 | |
7942 | | if ((modifiers() & B_SHIFT_KEY) != 0 && fSelectionPivotPose) { |
| 7942 | if (fMultipleSelection && (modifiers() & B_SHIFT_KEY) != 0 && fSelectionPivotPose) { |
7943 | 7943 | // multi pose extend/shrink current selection |
7944 | 7944 | bool select = !pose->IsSelected() || !extendSelection; |
7945 | 7945 | // This weird bit of logic causes the selection to always |