From ed98521a25e276310562db34a5ccee341559e71e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 22 Mar 2018 20:21:13 +0100 Subject: Fixed removing child from container. --- src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main') diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt index 916cbba3..2f702fad 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt @@ -61,6 +61,7 @@ open class SimplePanel(classes: Set = setOf(), init: (SimplePanel.() -> */ protected fun addInternal(child: Component): SimplePanel { children.add(child) + child.parent?.remove(child) child.parent = this refresh() return this -- cgit