From f9dde49657602bce662aeb139bef1973c602d2a8 Mon Sep 17 00:00:00 2001 From: Joana Bergsiek Date: Fri, 13 Oct 2023 13:40:34 +0200 Subject: [PATCH] Adds default view option to changeDisplay() --- packages/Sandblocks-Watch/SBWatchView.class.st | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/Sandblocks-Watch/SBWatchView.class.st b/packages/Sandblocks-Watch/SBWatchView.class.st index 624d10d4..f9300476 100644 --- a/packages/Sandblocks-Watch/SBWatchView.class.st +++ b/packages/Sandblocks-Watch/SBWatchView.class.st @@ -47,7 +47,8 @@ SBWatchView >> changeDisplay [ | index options | - options := Array streamContents: [:stream | self values allConversionsFor: SBInterfaces topLevel do: [:pair | stream nextPut: pair]]. + options := Array streamContents: [:stream | self values allConversionsFor: SBInterfaces topLevel do: [:pair | stream nextPut: pair]]. + options := options, {{'default'. self watchValuesContainer addAllMorphsBack: (watchValues collect: #asValueMorph)}}. index := UIManager default chooseFrom: (options collect: #first). index = 0 ifTrue: [^ self].