Skip to content

Commit

Permalink
Merge pull request #1868 from AlexisCnockaert/1866-The-repair-dialog-…
Browse files Browse the repository at this point in the history
…does-not-allow-to-cancel-if-we-did-not-select-an-item

Enabled cancel button / selected the first option by default ( if the list is not empty )
  • Loading branch information
jecisc authored Dec 4, 2024
2 parents 5a9cca5 + 3267eee commit be02c59
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ IceTipRepairRepositoryDialogPresenter >> initialExtentForWindow [
IceTipRepairRepositoryDialogPresenter >> initializeDialogWindow: aWindow [

super initializeDialogWindow: aWindow.

self refreshDialogButtons.

aWindow
addShortcutWith: [ :action | action
Expand All @@ -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' }
Expand Down

0 comments on commit be02c59

Please sign in to comment.