ENT-1902: If we are already in the JavaFX thread - perform direct invocation without postponing it. (#3177)

Or else if we are operating in JavaFX thread the sequence of invocations will change.
This commit is contained in:
Viktor Kolomeyko 2018-05-18 11:09:02 +01:00 committed by GitHub
parent ae5bacb4b4
commit 215e54f1ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,8 @@ class NodeMonitorModel {
// Only execute using "runLater()" if JavaFX been initialized.
// It may not be initialized in the unit test.
if(initialized.value.get()) {
// Also if we are already in the JavaFX thread - perform direct invocation without postponing it.
if(initialized.value.get() && !Platform.isFxApplicationThread()) {
Platform.runLater(op)
} else {
op()