Commit d215c650 authored by Riegel's avatar Riegel
Browse files

Style: Show indeterminate progress for ZIP parsing

parent f123a7ac
...@@ -91,7 +91,7 @@ public class CityDoctorController { ...@@ -91,7 +91,7 @@ public class CityDoctorController {
mainWindow.resetFilterComboBox(); mainWindow.resetFilterComboBox();
}); });
if (path.endsWith(".zip")) { if (path.endsWith(".zip")) {
loadCityGmlZipFile(path, numberOfRoundingPlaces, l, useValidation, lowMemory); loadCityGmlZipFile(path, numberOfRoundingPlaces, useValidation, lowMemory);
return; return;
} }
currentZipEntryManager = null; currentZipEntryManager = null;
...@@ -153,8 +153,8 @@ public class CityDoctorController { ...@@ -153,8 +153,8 @@ public class CityDoctorController {
} }
} }
private void loadCityGmlZipFile(String path, int numberOfRoundingPlaces, ProgressListener l, boolean useValidation, private void loadCityGmlZipFile(String path, int numberOfRoundingPlaces, boolean useValidation,
boolean lowMemory) throws CityGmlParseException, InvalidGmlFileException { boolean lowMemory) {
currentConfig = new ParserConfiguration(numberOfRoundingPlaces, useValidation, lowMemory); currentConfig = new ParserConfiguration(numberOfRoundingPlaces, useValidation, lowMemory);
try { try {
......
...@@ -150,8 +150,12 @@ public class OpenFileDialog { ...@@ -150,8 +150,12 @@ public class OpenFileDialog {
pathField.setDisable(true); pathField.setDisable(true);
selectBtn.setDisable(true); selectBtn.setDisable(true);
stage.setOnCloseRequest(Event::consume); stage.setOnCloseRequest(Event::consume);
Thread t = new Thread(() -> { Thread t = new Thread(() -> {
try { try {
if (path.endsWith(".zip")) {
Platform.runLater(() -> progress.setProgress(-1));
}
controller.loadCityGml(path, numberOfRoundingPlaces, progress::setProgress, useValidation, controller.loadCityGml(path, numberOfRoundingPlaces, progress::setProgress, useValidation,
lowMemory); lowMemory);
Platform.runLater(() -> stage.close()); Platform.runLater(() -> stage.close());
......
Supports Markdown
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