[Editor] Enable submitting on enter in autocommit Parameters
The bug was related to autocommit IntegerParameter, which did not update the value when user provided value by hand in text field and pressed the enter.
This commit is contained in:
@@ -21,11 +21,7 @@ abstract class Parameter<T>(
|
||||
val valueProperty: ObjectProperty<T> = SimpleObjectProperty(initialValue)
|
||||
var value by valueProperty
|
||||
|
||||
fun commit() {
|
||||
if (!autocommit) {
|
||||
onCommit(value, editorValueProperty.value, this::submit)
|
||||
}
|
||||
}
|
||||
fun commit() = onCommit(value, editorValueProperty.value, if (autocommit) this::submit else NOOP)
|
||||
|
||||
private fun submit() {
|
||||
value = editorValueProperty.value
|
||||
|
||||
Reference in New Issue
Block a user