fixed empty vaultList contextMenu

This commit is contained in:
Jan-Peter Klein
2024-10-09 16:55:56 +02:00
parent 44310cbd0e
commit 118a1411d8
2 changed files with 12 additions and 5 deletions

View File

@@ -112,6 +112,10 @@ public class VaultListController implements FxController {
vaultList.setItems(vaults);
vaultList.setCellFactory(cellFactory);
vaultList.prefHeightProperty().bind(
vaultList.fixedCellSizeProperty().multiply(Bindings.size(vaultList.getItems()))
);
selectedVault.bind(vaultList.getSelectionModel().selectedItemProperty());
vaults.addListener((ListChangeListener.Change<? extends Vault> c) -> {
while (c.next()) {