aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-02-11 22:44:29 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-02-11 22:47:46 +0000
commit6868474555207ab2dc636b1c1fd8408a160545fb (patch)
tree068d375e154f985547ed8b14d51c547f0971d114 /src/qt
parent9e68a8208f75327a301b84da6bf86b84868104d3 (diff)
parentb2e531e70a88f5c9e1c055ae7341520a3128e15d (diff)
downloadbitcoin-6868474555207ab2dc636b1c1fd8408a160545fb.tar.xz
Merge bitcoin-core/gui#780: Fix: Ensure 'Transaction View' remains disabled if no wallet is selected
b2e531e70a88f5c9e1c055ae7341520a3128e15d qt: update widgets availability on wallet selection (pablomartin4btc) Pull request description: This PR addresses an issue where, with no wallet selected, ticking on "Settings -> Mask values" checkbox twice enables the transaction tab when the checkbox is unticked. <details> <summary>Current behavior display on master</summary> ![Peek 2023-12-06 19-18](https://github.com/bitcoin-core/gui/assets/110166421/6ca4eab6-5ef0-44c1-971c-89b8bc7f0283) </details> <details> <summary>Correction display from this branch</summary> ![Peek 2023-12-07 13-07](https://github.com/bitcoin-core/gui/assets/110166421/1c78f2aa-1cf7-4d63-b4ce-c034877b4832) </details> Note for maintaners: this PR should be backported to both 25.x and 26.x. --- Originally this PR was disabling the "Mask Values" checkbox when no wallet was selected but since a reviewer pointed out that a user might want to open a wallet already on "privacy mode" I rolled that change out. <details> <summary>Original correction display disabling "Mask Values" </summary> ![Peek 2023-12-06 19-11](https://github.com/bitcoin-core/gui/assets/110166421/66fdf023-998a-434d-a5bd-1a3d848fb751) </details> ACKs for top commit: alfonsoromanz: Tested ACK https://github.com/bitcoin-core/gui/pull/780/commits/b2e531e70a88f5c9e1c055ae7341520a3128e15d hebasto: ACK b2e531e70a88f5c9e1c055ae7341520a3128e15d, tested on Ubuntu 22.04. Tree-SHA512: 6be77ab4d5ec86267a9b0a289a4d8600bb67d279f7e0be65e47b608ec392fe705cf026e32f3c082d2f27449b697d1d9e6a1d110035900d7a804ba823c9f5dfd4
Diffstat (limited to 'src/qt')
-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)