From d1ab1db1c5849d7e986027907fb884a3729bf722 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 23 Aug 2021 17:27:30 +0200 Subject: [PATCH] fix issues with subtabs in new wallets --- .../java/com/sparrowwallet/sparrow/AppController.java | 10 ++++++++-- .../sparrow/control/WalletImportDialog.java | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index add44646..52a11b9e 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -1188,7 +1188,7 @@ public class AppController implements Initializable { TabPane subTabs = new TabPane(); subTabs.setSide(Side.RIGHT); - subTabs.getStyleClass().addAll("master-only", "wallet-subtabs"); + subTabs.getStyleClass().add("master-only"); subTabs.rotateGraphicProperty().set(true); tab.setContent(subTabs); @@ -1218,7 +1218,13 @@ public class AppController implements Initializable { if(walletTabData.getWallet() == wallet.getMasterWallet()) { TabPane subTabs = (TabPane)walletTab.getContent(); addWalletSubTab(subTabs, storage, wallet, backupWallet); - Platform.runLater(() -> subTabs.getStyleClass().remove("master-only")); + Tab masterTab = subTabs.getTabs().get(0); + Label masterLabel = (Label)masterTab.getGraphic(); + masterLabel.setText(getAutomaticName(wallet.getMasterWallet())); + Platform.runLater(() -> { + subTabs.getStyleClass().remove("master-only"); + subTabs.getStyleClass().add("wallet-subtabs"); + }); } } } diff --git a/src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java index c7bb6570..4eb87fe9 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/WalletImportDialog.java @@ -48,7 +48,7 @@ public class WalletImportDialog extends Dialog { AnchorPane.setRightAnchor(scrollPane, 0.0); importAccordion = new Accordion(); - List keystoreImporters = List.of(new ColdcardSinglesig(), new CoboVaultSinglesig(), new KeystoneSinglesig(), new PassportSinglesig(), new SeedSigner(), new SpecterDIY()); + List keystoreImporters = List.of(new ColdcardSinglesig(), new CoboVaultSinglesig(), new KeystoneSinglesig(), new PassportSinglesig(), new SpecterDIY()); for(KeystoreFileImport importer : keystoreImporters) { FileWalletKeystoreImportPane importPane = new FileWalletKeystoreImportPane(importer); importAccordion.getPanes().add(importPane);