From 3267eee662a4319aeafa5c066b78d78ccc71ba9d Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Fri, 29 Nov 2024 11:15:09 +0100 Subject: [PATCH] Fixes #1866 enabled cancel button / selected the first option by default ( if the list is not empty ) --- ...ipRepairRepositoryDialogPresenter.class.st | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st b/Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st index 0b49eec935..5ef6ca781f 100644 --- a/Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st +++ b/Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st @@ -62,8 +62,6 @@ IceTipRepairRepositoryDialogPresenter >> initialExtentForWindow [ IceTipRepairRepositoryDialogPresenter >> initializeDialogWindow: aWindow [ super initializeDialogWindow: aWindow. - - self refreshDialogButtons. aWindow addShortcutWith: [ :action | action @@ -77,17 +75,20 @@ IceTipRepairRepositoryDialogPresenter >> initializeOptionsList [ optionsList hideColumnHeaders; addColumn: (SpCompositeTableColumn new - addColumn: (SpImageTableColumn new - evaluated: #icon; - beNotExpandable; - yourself); - addColumn: (SpStringTableColumn new - evaluated: #title; - yourself); - yourself); + addColumn: (SpImageTableColumn new + evaluated: #icon; + beNotExpandable; + yourself); + addColumn: (SpStringTableColumn new + evaluated: #title; + yourself); + yourself); items: self model availableRepairOptions; - whenSelectionChangedDo: [ :selection | self selectionChanged: selection selectedItem ]; - whenActivatedDo: [ :selection | selection ifNotNil: [ self accept ] ] + whenSelectionChangedDo: [ :selection | + self selectionChanged: selection selectedItem ]; + whenActivatedDo: [ :selection | selection ifNotNil: [ self accept ] ]. + optionsList items isEmpty ifFalse: [ + optionsList selectItem: optionsList items first ] ] { #category : 'initialization' }