Skip to content

Commit

Permalink
qt: update widgets availability on wallet selection
Browse files Browse the repository at this point in the history
Add m_mask_value_action into setWalletActionsEnabled function so it's
only enabled when a wallet is selected. For the transaction history
view check if there's a selected wallet on enableHistoryAction() since
its availability also depends on the mask value checkbox.
  • Loading branch information
pablomartin4btc committed Dec 6, 2023
1 parent 6d57909 commit da7dcdf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
#ifdef ENABLE_WALLET
void BitcoinGUI::enableHistoryAction(bool privacy)
{
historyAction->setEnabled(!privacy);
if (historyAction->isChecked()) gotoOverviewPage();
if (walletFrame->currentWalletModel()) {
historyAction->setEnabled(!privacy);
if (historyAction->isChecked()) gotoOverviewPage();
}
}

void BitcoinGUI::setWalletController(WalletController* wallet_controller, bool show_loading_minimized)
Expand Down Expand Up @@ -803,6 +805,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
m_close_wallet_action->setEnabled(enabled);
m_close_all_wallets_action->setEnabled(enabled);
m_migrate_wallet_action->setEnabled(enabled);
m_mask_values_action->setEnabled(enabled);
}

void BitcoinGUI::createTrayIcon()
Expand Down

0 comments on commit da7dcdf

Please sign in to comment.