aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletframe.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <[email protected]>2018-05-18 00:46:44 +0100
committerJoão Barbosa <[email protected]>2018-05-18 00:46:44 +0100
commit2e751347190049ac1b7fb8378db004956700aaa1 (patch)
treecee6b15ee75c34fea82e1f40b43dbf8925e2725c /src/qt/walletframe.cpp
parentui: Support wallets loaded dynamically (diff)
downloaddiscoin-2e751347190049ac1b7fb8378db004956700aaa1.tar.xz
discoin-2e751347190049ac1b7fb8378db004956700aaa1.zip
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 5b13353d7..eb0eba21e 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;