From 745b9f78a505556e41cf95ca5d5f79201c616be5 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Fri, 17 Nov 2023 15:32:32 +0100 Subject: [PATCH] Ensure array dialog preview is up-to-date --- .../kotlin/com/fwdekker/randomness/template/TemplateActions.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/fwdekker/randomness/template/TemplateActions.kt b/src/main/kotlin/com/fwdekker/randomness/template/TemplateActions.kt index b6845ab71..20fcd818f 100644 --- a/src/main/kotlin/com/fwdekker/randomness/template/TemplateActions.kt +++ b/src/main/kotlin/com/fwdekker/randomness/template/TemplateActions.kt @@ -133,9 +133,10 @@ class TemplateInsertAction( inner class ArrayDecoratorConfigurable(arrayDecorator: ArrayDecorator) : Configurable, Disposable { private val editor = ArrayDecoratorEditor(arrayDecorator, embedded = true) + .also { it.addChangeListener { it.apply() } } .also { Disposer.register(this, it) } private val previewPanel = - PreviewPanel { template.deepCopy().also { it.arrayDecorator.enabled = true } } + PreviewPanel { template.deepCopy(retainUuid = true).also { it.arrayDecorator.enabled = true } } .also { Disposer.register(this, it) }