From af85d94f8c9a89a985c0591560470b0e5f9c45ae Mon Sep 17 00:00:00 2001 From: DEMAREY Christophe Date: Fri, 13 Dec 2024 15:09:19 +0100 Subject: [PATCH] fix search of element in SpCollectionListModel. It should use equality. Bueg introduced in commit 3967790c4be27aab48d6c61596f90f4a5ca201a9. It has already been fixed in Pharo 13. see https://github.com/pharo-spec/Spec/commit/1b48d5a8fd20b88223b635c1620c7f2c4ec3b9f1 and https://github.com/pharo-spec/Spec/commit/23bc559e5f43954409fabda30c89daaaf6f18c6d --- src/Spec2-Core/SpCollectionListModel.class.st | 2 +- src/Spec2-Core/SpDropListItem.class.st | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spec2-Core/SpCollectionListModel.class.st b/src/Spec2-Core/SpCollectionListModel.class.st index 395880b2..de1b35eb 100644 --- a/src/Spec2-Core/SpCollectionListModel.class.st +++ b/src/Spec2-Core/SpCollectionListModel.class.st @@ -81,7 +81,7 @@ SpCollectionListModel >> hasElementAt: index [ { #category : 'accessing' } SpCollectionListModel >> indexOf: anItem ifAbsent: aBlock [ - ^ collection identityIndexOf: anItem ifAbsent: aBlock + ^ collection indexOf: anItem ifAbsent: aBlock ] { #category : 'initialization' } diff --git a/src/Spec2-Core/SpDropListItem.class.st b/src/Spec2-Core/SpDropListItem.class.st index 9302ee5b..6b680701 100644 --- a/src/Spec2-Core/SpDropListItem.class.st +++ b/src/Spec2-Core/SpDropListItem.class.st @@ -40,7 +40,7 @@ SpDropListItem >> = anObject [ self == anObject ifTrue: [ ^ true ]. self class = anObject class ifFalse: [ ^ false ]. - ^ self label = anObject label and: [ action = anObject action ] + ^ self model = anObject model ] { #category : 'protocol' }