Skip to content

Commit 1a6acab

Browse files
ddamkeddamke
authored andcommitted
close app after import of old sql
1 parent 200a86a commit 1a6acab

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/main/java/de/doubleslash/keeptime/view/SettingsController.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,22 +282,14 @@ private void initImportButton(){
282282
final String username = applicationProperties.getSpringDataSourceUserName();
283283
final String password = applicationProperties.getSpringDataSourcePassword();
284284

285-
model.getAllProjects().clear();
286-
model.getAvailableProjects().clear();
287285

288286
RunScript.execute(url, username, password, file.toString(), Charset.defaultCharset(), true);
289-
290-
List<Project> projects = model.getProjectRepository().findAll();
291-
LOG.debug("Found '{}' projects", projects.size());
292-
model.getAllProjects().addAll(projects);
293-
model.getAvailableProjects()
294-
.addAll(model.getAllProjects().stream().filter(Project::isEnabled).collect(Collectors.toList()));
295-
296287
Alert informationDialog = new Alert(AlertType.INFORMATION);
297288
informationDialog.setTitle("Import done");
298289
informationDialog.setHeaderText("The data was imported.");
299290
informationDialog.setContentText("KeepTime will now be CLOSED! You have to RESTART it again to see the changes");
300291
informationDialog.showAndWait();
292+
Platform.exit();
301293

302294

303295
} catch (SQLException e) {

0 commit comments

Comments
 (0)