From a2e07602132bb98a3f5ce9e4fe25c86c5993d8ac Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Fri, 5 Apr 2024 09:25:29 +0200 Subject: [PATCH] fixes https://github.com/pharo-spec/Spec/issues/1530 --- src/Spec2-Dialogs/SpSelectDialog.class.st | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Spec2-Dialogs/SpSelectDialog.class.st b/src/Spec2-Dialogs/SpSelectDialog.class.st index 78a0d165..0175a1bc 100644 --- a/src/Spec2-Dialogs/SpSelectDialog.class.st +++ b/src/Spec2-Dialogs/SpSelectDialog.class.st @@ -165,8 +165,8 @@ SpSelectDialog >> items [ SpSelectDialog >> items: aCollection [ list items: aCollection. - aCollection size > 1 - ifTrue: [ list selectItem: aCollection first ] + aCollection ifNotEmpty: [ + list selectItem: aCollection first ] ] { #category : 'api' } @@ -185,6 +185,12 @@ SpSelectDialog >> openModal [ ifFalse: [ nil ] ] +{ #category : 'api' } +SpSelectDialog >> selectFirst [ + + list selectFirst +] + { #category : 'api' } SpSelectDialog >> selectIndex: aNumber [