Skip to content

Commit

Permalink
Only spawn a new tab on the selection when both shift and ctrl are pr…
Browse files Browse the repository at this point in the history
…essed in lists [feenkcom/gtoolkit#4143]
  • Loading branch information
chisandrei committed Nov 5, 2024
1 parent 92c7de9 commit 4ca6e72
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/GToolkit-Phlow/GtPhlowListToSelectHandler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@ GtPhlowListToSelectHandler >> selectionChangedEvent: anEvent [
selectionDo: [ :aSelection |
| currentWidgetElement selectedObject |
aSelection isNotEmpty
ifTrue: [ currentWidgetElement := anEvent currentTarget.
ifTrue: [
| shouldShowSpace |
currentWidgetElement := anEvent currentTarget.
selectedObject := currentWidgetElement selectionCallback
value: aSelection indices.
shouldShowSpace := anEvent sourceEvent notNil and: [
anEvent sourceEvent modifiers isPrimaryModifier and: [
anEvent sourceEvent modifiers isShift ] ].

self transformation
select: selectedObject
indices: aSelection indices
from: currentWidgetElement
shouldShowSpace: (anEvent sourceEvent notNil and: [
anEvent sourceEvent modifiers isPrimaryModifier]) ] ]
shouldShowSpace: shouldShowSpace ] ]
]

{ #category : #'api - event managing' }
Expand Down

0 comments on commit 4ca6e72

Please sign in to comment.