Trying to fix storage.

This commit is contained in:
Alexander Nozik 2018-08-01 17:04:46 +03:00
parent a4a3255aec
commit 8d457ad82d
4 changed files with 9 additions and 8 deletions

View File

@ -49,11 +49,11 @@ class NumassStorage : FileStorage {
val description: String
get() = meta.getString("description", "")
private constructor(parent: FileStorage, config: Meta, shelf: String) : super(parent, config, shelf) {
refresh()
}
private constructor(parent: FileStorage, config: Meta, shelf: String) : super(parent, config, shelf)
constructor(context: Context, config: Meta, path: Path) : super(context, config, path) {
constructor(context: Context, config: Meta, path: Path) : super(context, config, path)
init {
refresh()
}

View File

@ -149,7 +149,7 @@ class AmplitudeView : View(title = "Numass amplitude spectrum plot", icon = Imag
spectrum.withBinning(binning),
adapter
)
group.set(plot)
group.add(plot)
}
group
}

View File

@ -14,6 +14,7 @@ import hep.dataforge.storage.api.ValueIndex
import hep.dataforge.tables.Adapters
import hep.dataforge.tables.ListTable
import hep.dataforge.tables.Table
import hep.dataforge.toList
import hep.dataforge.values.Values
import javafx.collections.FXCollections
import javafx.collections.MapChangeListener
@ -59,7 +60,7 @@ class SlowControlView : View(title = "Numass slow control view", icon = ImageVie
"showSymbol" to false
"showErrors" to false
}
group.set(plot)
group.add(plot)
}
group
} ui {
@ -80,7 +81,7 @@ class SlowControlView : View(title = "Numass slow control view", icon = ImageVie
loader.index
}
try {
return ListTable(loader.format, index.query(query))
return ListTable(loader.format, index.query(query).toList())
} catch (e: Exception) {
throw RuntimeException(e)
}

View File

@ -62,7 +62,7 @@ class StorageView(val storage: Storage) : View(title = "Numass storage", icon =
}
is TableLoader -> {
if (selected) {
scView.set(id, content)
scView[id] = content
} else {
scView.remove(id)
}