Skip to content

Commit

Permalink
Add a button to unselect all settings to the settings export dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
leMaik committed Jan 5, 2025
1 parent 4566fed commit bf4cb89
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public SettingsExport(JsonObject json) {

HBox buttonBox = new HBox();
buttonBox.setAlignment(Pos.BOTTOM_CENTER);
buttonBox.setSpacing(10);

Button selectAllButton = new Button("Select All");
selectAllButton.setOnAction(event -> {
Expand All @@ -166,6 +167,13 @@ public SettingsExport(JsonObject json) {
});
buttonBox.getChildren().add(selectAllButton);

Button unselectAllButton = new Button("Unselect All");
unselectAllButton.setOnAction(event -> {
checkMap.values().forEach(checkbox -> checkbox.setSelected(false));
update();
});
buttonBox.getChildren().add(unselectAllButton);

Label spacer = new Label(" ");
spacer.setMaxWidth(Double.POSITIVE_INFINITY);
buttonBox.getChildren().add(spacer);
Expand Down

0 comments on commit bf4cb89

Please sign in to comment.