Merge #18896: qt: Reset toolbar after all wallets are closed

1e9bfd4926 qt: Reset toolbar after all wallets are closed (Hennadii Stepanov)

Pull request description:

  If the last open wallet is closed from the non-"Overview" tab, that tab remains active when a new wallet is opened:

  ![Screenshot from 2020-05-06 09-00-26](https://user-images.githubusercontent.com/32963518/81142394-46821880-8f78-11ea-84b5-1d02f2b7f3f1.png)

  This PR fixes this bug.

ACKs for top commit:
  promag:
    Code review ACK 1e9bfd4926.
  luke-jr:
    utACK 1e9bfd4926
  jonasschnelli:
    utACK 1e9bfd4926

Tree-SHA512: a8dfd7591267e9544ad40c87581d554e5cfaad4b2a5bbfdbaf2596dc6869d2ac6cf7877adfef3d528fc61b081d40c6e30d787bbd7280ef7946aa7f7d9bc8b18e
This commit is contained in:
fanquake 2020-07-09 20:33:52 +08:00
commit 64bf5d64df
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -683,6 +683,7 @@ void BitcoinGUI::removeWallet(WalletModel* walletModel)
m_wallet_selector->removeItem(index);
if (m_wallet_selector->count() == 0) {
setWalletActionsEnabled(false);
overviewAction->setChecked(true);
} else if (m_wallet_selector->count() == 1) {
m_wallet_selector_label_action->setVisible(false);
m_wallet_selector_action->setVisible(false);