Commit d215c650 authored by Riegel's avatar Riegel
Browse files

Style: Show indeterminate progress for ZIP parsing

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 7 additions and 3 deletions
+7 -3
......@@ -91,7 +91,7 @@ public class CityDoctorController {
mainWindow.resetFilterComboBox();
});
if (path.endsWith(".zip")) {
loadCityGmlZipFile(path, numberOfRoundingPlaces, l, useValidation, lowMemory);
loadCityGmlZipFile(path, numberOfRoundingPlaces, useValidation, lowMemory);
return;
}
currentZipEntryManager = null;
......@@ -153,8 +153,8 @@ public class CityDoctorController {
}
}
private void loadCityGmlZipFile(String path, int numberOfRoundingPlaces, ProgressListener l, boolean useValidation,
boolean lowMemory) throws CityGmlParseException, InvalidGmlFileException {
private void loadCityGmlZipFile(String path, int numberOfRoundingPlaces, boolean useValidation,
boolean lowMemory) {
currentConfig = new ParserConfiguration(numberOfRoundingPlaces, useValidation, lowMemory);
try {
......
......@@ -150,8 +150,12 @@ public class OpenFileDialog {
pathField.setDisable(true);
selectBtn.setDisable(true);
stage.setOnCloseRequest(Event::consume);
Thread t = new Thread(() -> {
try {
if (path.endsWith(".zip")) {
Platform.runLater(() -> progress.setProgress(-1));
}
controller.loadCityGml(path, numberOfRoundingPlaces, progress::setProgress, useValidation,
lowMemory);
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