aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/SimplePanel.kt1
1 files changed, 1 insertions, 0 deletions
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<String> = setOf(), init: (SimplePanel.() ->
*/
protected fun addInternal(child: Component): SimplePanel {
children.add(child)
+ child.parent?.remove(child)
child.parent = this
refresh()
return this