From f92245ee04e881df9403a4447aa8c413fd628693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Sun, 10 Dec 2023 19:13:22 +0100 Subject: [PATCH] Make sure that the first item is selected when opening a select dialog with more than 0 choices. --- src/Spec2-Dialogs/SpSelectDialog.class.st | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Spec2-Dialogs/SpSelectDialog.class.st b/src/Spec2-Dialogs/SpSelectDialog.class.st index b0eaebd1..8f5858d5 100644 --- a/src/Spec2-Dialogs/SpSelectDialog.class.st +++ b/src/Spec2-Dialogs/SpSelectDialog.class.st @@ -164,7 +164,9 @@ SpSelectDialog >> items [ { #category : 'api' } SpSelectDialog >> items: aCollection [ - list items: aCollection + list items: aCollection. + aCollection size > 1 + ifTrue: [ list selectItem: aCollection first ] ] { #category : 'api' }