Skip to content

Commit

Permalink
Making importing a single file easier (Issue #5508) (#5513)
Browse files Browse the repository at this point in the history
* Added condition: if only one entry is imported, it automatically selects said entry, making importing single files easier, referring to Isse #5508

* trying Platform.runLater around the if-statement, also tried around everything in 'initialize', including and excluding the if-statement

* reverted the last change and added a comment as to why the code is there

* fixed a mistake, where 2 returns where present, where one was not necessary
  • Loading branch information
P4trice authored and tobiasdiez committed Nov 3, 2019
1 parent 224dde1 commit 7e98453
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ private void initialize() {
}
}).executeWith(Globals.TASK_EXECUTOR);

/*
inserted the if-statement here, since a Platforn.runLater() call did not work.
also tried to move it to the end of the initialize method, but it did not select the entry.
*/
if (entriesListView.getItems().size() == 1) {
selectAllNewEntries();
}

return container;
})
.withOnMouseClickedEvent((entry, event) -> entriesListView.getCheckModel().toggleCheckState(entry))
Expand Down

0 comments on commit 7e98453

Please sign in to comment.