Ticket #13462: 0003-Tracker-Fix-Shift-click-multi-selection-not-being-di.patch

File 0003-Tracker-Fix-Shift-click-multi-selection-not-being-di.patch, 1.3 KB (added by owenca, 8 years ago)
  • src/kits/tracker/PoseView.cpp

    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,  
    79397939    if (pose == fSelectionPivotPose && !extendSelection)
    79407940        return;
    79417941
    7942     if ((modifiers() & B_SHIFT_KEY) != 0 && fSelectionPivotPose) {
     7942    if (fMultipleSelection && (modifiers() & B_SHIFT_KEY) != 0 && fSelectionPivotPose) {
    79437943        // multi pose extend/shrink current selection
    79447944        bool select = !pose->IsSelected() || !extendSelection;
    79457945            // This weird bit of logic causes the selection to always