aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-22 12:43:43 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-22 12:43:43 +0100
commite40c13c62de806169368adc7c2c4212f7df6413b (patch)
tree250e39d407cd2c6ef19c9a8ea0176a3215a4a818 /src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt
parent1aefed336f9ef305f59d3668abc8a39c550e921d (diff)
downloadkvision-e40c13c62de806169368adc7c2c4212f7df6413b.tar.gz
kvision-e40c13c62de806169368adc7c2c4212f7df6413b.tar.bz2
kvision-e40c13c62de806169368adc7c2c4212f7df6413b.zip
Property values delegated to a map (idea by tieskedh)
Closes #2
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/StackPanel.kt6
1 files changed, 1 insertions, 5 deletions
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")