mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Notify the GUI that the keypool has changed to set the receive button
Whenever the keypool changes (new keys generated, new seed set, keypool runs out, etc.), notify the GUI that the keypool has changed. The receive button can then be enabled and disabled as necessary.
This commit is contained in:
@@ -100,8 +100,13 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
|
||||
ui->useBech32->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
|
||||
// eventually disable the main receive button if private key operations are disabled
|
||||
// Set the button to be enabled or disabled based on whether the wallet can give out new addresses.
|
||||
ui->receiveButton->setEnabled(model->canGetAddresses());
|
||||
|
||||
// Enable/disable the receive button if the wallet is now able/unable to give out new addresses.
|
||||
connect(model, &WalletModel::canGetAddressesChanged, [this] {
|
||||
ui->receiveButton->setEnabled(model->canGetAddresses());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user