From e40c13c62de806169368adc7c2c4212f7df6413b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 22 Feb 2018 12:43:43 +0100 Subject: Property values delegated to a map (idea by tieskedh) Closes #2 --- src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt') diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt index bac027fe..da41db9f 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt @@ -44,11 +44,7 @@ open class StackPanel( /** * The index of active (visible) child. */ - var activeIndex = -1 - set(value) { - field = value - refresh() - } + var activeIndex by refreshOnUpdate(-1) init { @Suppress("LeakingThis") -- cgit