From cff80754d2e0f753a4528942c5b6bd7525e85891 Mon Sep 17 00:00:00 2001 From: Edvin Syse Date: Fri, 21 Dec 2018 10:22:15 +0100 Subject: [PATCH] Added creatable forwarding to workspace actions --- src/main/java/tornadofx/Component.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/tornadofx/Component.kt b/src/main/java/tornadofx/Component.kt index cab60f803..311365dc1 100644 --- a/src/main/java/tornadofx/Component.kt +++ b/src/main/java/tornadofx/Component.kt @@ -453,6 +453,9 @@ abstract class UIComponent(viewTitle: String? = "", icon: Node? = null) : Compon deletableWhen { uiComponent.deletable } whenDeleted { uiComponent.onDelete() } + creatableWhen { uiComponent.creatable } + whenCreated { uiComponent.onCreate() } + refreshableWhen { uiComponent.refreshable } whenRefreshed { uiComponent.onRefresh() } } @@ -1128,7 +1131,7 @@ abstract class UIComponent(viewTitle: String? = "", icon: Node? = null) : Compon labelPosition: Orientation = Orientation.HORIZONTAL, builder: StageAwareFieldset.() -> Unit ): Stage? { - val fragment = builderFragment(title, scope, { form() }) + val fragment = builderFragment(title, scope) { form() } val fieldset = StageAwareFieldset(title, labelPosition) fragment.root.add(fieldset) fieldset.stage = fragment.openWindow(modality = modality, stageStyle = stageStyle, owner = owner)!!