aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2018-05-18 10:10:29 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2018-05-18 10:10:46 +0200
commite54550303bc9b8f2ce5d68116af80502be8a2a94 (patch)
treefd2f91a475173cb7f1ce9a423d86fb14e5c73267 /src/qt/walletframe.cpp
parent2a7c53bc2aa032d443435cfa22058dc11b8bd930 (diff)
parent2e751347190049ac1b7fb8378db004956700aaa1 (diff)
downloadbitcoin-e54550303bc9b8f2ce5d68116af80502be8a2a94.tar.xz
Merge #13097: ui: Support wallets loaded dynamically
2e7513471 fixup! ui: Support wallets loaded dynamically (João Barbosa) 0e674ba55 ui: Support wallets loaded dynamically (João Barbosa) 1c8fe0bf9 ui: Remove unnecessary variable fFirstWallet (João Barbosa) Pull request description: Add support in the UI for wallets loaded dynamically. Tree-SHA512: 4016d61580b31e28c49861b1cb0e77fac5417f9676a6ce6156be28cb6059fdf3d3dd4d57dbbc22a574ad428c2a4a3702aedca596a84e644ce148e1084feb29c9
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r--src/qt/walletframe.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index 5b13353d7b..eb0eba21ef 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -57,8 +57,13 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
walletView->setWalletModel(walletModel);
walletView->showOutOfSyncWarning(bOutOfSync);
- /* TODO we should goto the currently selected page once dynamically adding wallets is supported */
- walletView->gotoOverviewPage();
+ WalletView* current_wallet_view = currentWalletView();
+ if (current_wallet_view) {
+ walletView->setCurrentIndex(current_wallet_view->currentIndex());
+ } else {
+ walletView->gotoOverviewPage();
+ }
+
walletStack->addWidget(walletView);
mapWalletViews[name] = walletView;