From c81aae0c6af39eeddf1a94a1a9b51727945087ee Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 31 Aug 2023 10:54:16 +0200 Subject: [PATCH] minor account renaming bug fixes --- src/main/java/com/sparrowwallet/sparrow/AppController.java | 5 +++++ .../java/com/sparrowwallet/sparrow/wallet/WalletForm.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index b5c4cb0d..eb3103e2 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -2133,6 +2133,11 @@ public class AppController implements Initializable { contextMenu.getItems().add(delete); } + contextMenu.setOnShowing(event -> { + Wallet renameWallet = AppServices.get().getWallet(walletId); + rename.setDisable(!renameWallet.isValid()); + }); + return contextMenu; } diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java index bcc7ca2c..e55c2ead 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletForm.java @@ -597,6 +597,10 @@ public class WalletForm { public void walletLabelChanged(WalletLabelChangedEvent event) { if(event.getWallet() == wallet) { Platform.runLater(() -> EventManager.get().post(new WalletDataChangedEvent(wallet))); + + if(walletTransactionsEntry != null) { + walletTransactionsEntry.labelProperty().set(event.getWallet().getDisplayName()); + } } }