-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaned-up ToMultiSelectElement + optimize command appliers (removed …
…all event uses - optimization after after Pablo remark about overused events )
- Loading branch information
Showing
23 changed files
with
102 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/Toplo-Widget-List/ToElementCommandApplicationRequest.class.st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Class { | ||
#name : #ToImmediateCommandApplier, | ||
#superclass : #ToCommandApplier, | ||
#category : #'Toplo-Widget-List-Command-Support' | ||
} | ||
|
||
{ #category : #accessing } | ||
ToImmediateCommandApplier >> command: aCommand addedIn: aSelecter [ | ||
|
||
aSelecter applyCommand: aCommand | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Toplo-Widget-Select/ToMultiSelectListElementEventHandler.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Class { | ||
#name : #ToMultiSelectListElementEventHandler, | ||
#superclass : #ToSelectListElementEventHandler, | ||
#category : #'Toplo-Widget-Select-List' | ||
} | ||
|
||
{ #category : #'api - accessing' } | ||
ToMultiSelectListElementEventHandler >> eventsToHandle [ | ||
|
||
^ super eventsToHandle , { ToSelectGroupSelectionChangedEvent } | ||
] | ||
|
||
{ #category : #'event handling' } | ||
ToMultiSelectListElementEventHandler >> selectGroupSelectionChangedEvent: anEvent [ | ||
|
||
| touchedIntervals target | | ||
touchedIntervals := anEvent touchedIntervals. | ||
target := anEvent currentTarget. | ||
touchedIntervals do: [ :int | | ||
target disabledSelecter selectIndex: int first to: int last. | ||
self flag: 'Given that the list is initialized with #makeDisabledUnselectable: true, having to unselect here is not desired. It is necessary here because instead, the secondary selection can be on a group index.'. | ||
target unselectableSelecter selectIndex: int first to: int last. | ||
target dataSource notifyItemsChanged: int ] | ||
] |
Oops, something went wrong.