aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-05-18 00:46:44 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-05-18 00:46:44 +0100
commit2e751347190049ac1b7fb8378db004956700aaa1 (patch)
treecee6b15ee75c34fea82e1f40b43dbf8925e2725c /src/qt/walletframe.cpp
parent0e674ba5572275bcc1eb8f91c6292f871925f965 (diff)
downloadbitcoin-2e751347190049ac1b7fb8378db004956700aaa1.tar.xz
fixup! ui: Support wallets loaded dynamically
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;