fixup! ui: Support wallets loaded dynamically

This commit is contained in:
João Barbosa 2018-05-18 00:46:44 +01:00
parent 0e674ba557
commit 2e75134719

View file

@ -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;