Skip to content

Commit

Permalink
fix: Don't clear the selection when clicking on selected cells (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmorley authored Mar 29, 2024
1 parent 1f2da37 commit 0fc170f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ class InteractiveCollectionView: NSCollectionView {
cursor = indexPath
}

} else {
} else if !selectionIndexPaths.contains(indexPath) {

// Select a clicked item if it's not within the current selection.

let selectionIndexPaths = selectionIndexPaths
deselectItems(at: selectionIndexPaths)
Expand Down

0 comments on commit 0fc170f

Please sign in to comment.