From 0e8f2955421ed403eb41ddaf13e369c6a0c1a298 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 20 Jul 2018 16:21:48 +0300 Subject: [PATCH] Laminate to kotlin and simplified. --- .../main/groovy/inr/numass/scripts/underflow/Underflow.groovy | 2 +- .../src/main/kotlin/inr/numass/viewer/AmplitudeView.kt | 2 +- .../src/main/kotlin/inr/numass/viewer/SlowControlView.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy b/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy index 2a7346ba..e9e42a28 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/underflow/Underflow.groovy @@ -70,7 +70,7 @@ shell.eval { def plotGroup = new PlotGroup("points"); def adapter = Adapters.buildXYAdapter(CHANNEL_KEY, COUNT_RATE_KEY) points.each { - plotGroup.add( + plotGroup.set( DataPlot.plot( it.key as String, adapter, diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt index 5d8f873e..b156f7b9 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/AmplitudeView.kt @@ -149,7 +149,7 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag spectrum.withBinning(binning), adapter ) - group.add(plot) + group.set(plot) } group } diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt index b2a93ab5..003d7a1e 100644 --- a/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/SlowControlView.kt @@ -59,7 +59,7 @@ class SlowControlView : View(title = "Numass slow control view", icon = ImageVie "showSymbol" to false "showErrors" to false } - group.add(plot) + group.set(plot) } group } ui {