Archived
0

fix freeze on complete search

This commit is contained in:
iMoHax
2015-01-13 12:13:09 +03:00
parent fe548e3ef4
commit 1ff4b8168b

View File

@@ -50,18 +50,18 @@ public class ProgressController {
text.textProperty().bind(task.messageProperty()); text.textProperty().bind(task.messageProperty());
cancel.getProperties().put(TASK_KEY, task); cancel.getProperties().put(TASK_KEY, task);
task.setOnSucceeded(e -> { task.setOnSucceeded(e -> {
dlg.hide(); Platform.runLater(dlg::hide);
onSuccess.accept(task.getValue()); onSuccess.accept(task.getValue());
unbind(); unbind();
}); });
task.setOnCancelled(e -> { task.setOnCancelled(e -> {
dlg.hide(); Platform.runLater(dlg::hide);
onSuccess.accept(task.getValue()); onSuccess.accept(task.getValue());
unbind(); unbind();
}); });
task.setOnFailed(e -> { task.setOnFailed(e -> {
dlg.hide(); Platform.runLater(dlg::hide);
Screeners.showException(task.getException()); Screeners.showException(task.getException());
}); });
} }