aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpablomartin4btc <pablomartin4btc@gmail.com>2023-12-06 18:48:03 -0300
committerpablomartin4btc <pablomartin4btc@gmail.com>2023-12-07 12:49:23 -0300
commitb2e531e70a88f5c9e1c055ae7341520a3128e15d (patch)
tree2a06245236c3c32fbe2913a6265d20a6a3764e53
parent6d5790956f45e3de5c6c4ee6fda21878b0d1287b (diff)
qt: update widgets availability on wallet selection
The Transaction View should be only enabled when a wallet is selected. Therefore it has been added a condition for a selected wallet on enableHistoryAction() since its availability also depends on the mask value checkbox.
-rw-r--r--src/qt/bitcoingui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index fd71938b60..3e177af53c 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -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)