Skip to content

Commit

Permalink
ToListElementEventHandler>>showHidePlaceholderIn: fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
plantec committed Oct 18, 2024
1 parent a676507 commit 729d033
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Toplo-Widget-List/ToListElementEventHandler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ ToListElementEventHandler >> secondaryClickEvent: anEvent [
{ #category : #'list element handling' }
ToListElementEventHandler >> showHidePlaceholderIn: aListElement [

aListElement dataAccessor ifEmpty: [ ^ aListElement showPlaceholder ].
aListElement dataAccessor ifEmpty: [
aListElement selecter deselectAll.
^ aListElement showPlaceholder ].
aListElement hidePlaceholder
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ ToSievedListElementEventHandler >> listSelectionCommandAppliedEvent: aPreNotific
" first check if the request is for the primary selection model "
listSelModel = aPreNotification selectionModel ifFalse: [ ^ self ].

" have to do nothing if the list is empty. Else, the selection can be lost in case of single select"
listElement dataAccessor ifEmpty: [ ^ self ].
" reset the selection in case of single selection mode "
aPreNotification currentTarget isMultipleSelection ifFalse: [
sieveSelectionModel deselectAll ].
Expand Down

0 comments on commit 729d033

Please sign in to comment.