Commit 208b4866 authored by duminil's avatar duminil
Browse files

RegionChooser: Fix JavaFX thread problem.

parent dcf31f94
......@@ -2,6 +2,7 @@
import java.io.File;
import java.util.ArrayList;
import javafx.application.Platform;
import netscape.javascript.JSObject;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
......@@ -89,9 +90,13 @@ public void jobStatusChanged(JobStatusEvent event) {
try {
File file = job.getResult();
novaFactoryOpenLayer.call("updateStatus", "DOWNLOADED AS ZIP");
// novaFactoryOpenLayer.call("selectSaveFile", file.toString());
// System.out.println("CityGML at " + file.getAbsolutePath());
//TODO: Call downloadFinished if FAILED
Platform.runLater(new Runnable() {
@Override
public void run() {
novaFactoryOpenLayer.call("selectSaveFile", file.toString());
}
});
novaFactoryOpenLayer.call("downloadFinished");
} catch (FailedTransmissionException ex) {
ex.printStackTrace();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment