Skip to content

Commit 2e75134

Browse files
committed
fixup! ui: Support wallets loaded dynamically
1 parent 0e674ba commit 2e75134

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/qt/walletframe.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
5757
walletView->setWalletModel(walletModel);
5858
walletView->showOutOfSyncWarning(bOutOfSync);
5959

60-
/* TODO we should goto the currently selected page once dynamically adding wallets is supported */
61-
walletView->gotoOverviewPage();
60+
WalletView* current_wallet_view = currentWalletView();
61+
if (current_wallet_view) {
62+
walletView->setCurrentIndex(current_wallet_view->currentIndex());
63+
} else {
64+
walletView->gotoOverviewPage();
65+
}
66+
6267
walletStack->addWidget(walletView);
6368
mapWalletViews[name] = walletView;
6469

0 commit comments

Comments
 (0)