mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-23 02:10:51 +02:00
Only update the updateSmartFeeLabel once in sync
This commit is contained in:
parent
564e1ab0f3
commit
0d9d2a1f7c
@ -28,6 +28,8 @@
|
|||||||
#include <wallet/fees.h>
|
#include <wallet/fees.h>
|
||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
|
|
||||||
|
#include <validation.h>
|
||||||
|
|
||||||
#include <QFontMetrics>
|
#include <QFontMetrics>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@ -134,7 +136,7 @@ void SendCoinsDialog::setClientModel(ClientModel *_clientModel)
|
|||||||
this->clientModel = _clientModel;
|
this->clientModel = _clientModel;
|
||||||
|
|
||||||
if (_clientModel) {
|
if (_clientModel) {
|
||||||
connect(_clientModel, &ClientModel::numBlocksChanged, this, &SendCoinsDialog::updateSmartFeeLabel);
|
connect(_clientModel, &ClientModel::numBlocksChanged, this, &SendCoinsDialog::updateNumberOfBlocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -744,6 +746,12 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl)
|
|||||||
ctrl.fAllowWatchOnly = model->wallet().privateKeysDisabled();
|
ctrl.fAllowWatchOnly = model->wallet().privateKeysDisabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SendCoinsDialog::updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state) {
|
||||||
|
if (sync_state == SynchronizationState::POST_INIT) {
|
||||||
|
updateSmartFeeLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SendCoinsDialog::updateSmartFeeLabel()
|
void SendCoinsDialog::updateSmartFeeLabel()
|
||||||
{
|
{
|
||||||
if(!model || !model->getOptionsModel())
|
if(!model || !model->getOptionsModel())
|
||||||
|
@ -17,6 +17,7 @@ class ClientModel;
|
|||||||
class PlatformStyle;
|
class PlatformStyle;
|
||||||
class SendCoinsEntry;
|
class SendCoinsEntry;
|
||||||
class SendCoinsRecipient;
|
class SendCoinsRecipient;
|
||||||
|
enum class SynchronizationState;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class SendCoinsDialog;
|
class SendCoinsDialog;
|
||||||
@ -98,6 +99,7 @@ private Q_SLOTS:
|
|||||||
void coinControlClipboardLowOutput();
|
void coinControlClipboardLowOutput();
|
||||||
void coinControlClipboardChange();
|
void coinControlClipboardChange();
|
||||||
void updateFeeSectionControls();
|
void updateFeeSectionControls();
|
||||||
|
void updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state);
|
||||||
void updateSmartFeeLabel();
|
void updateSmartFeeLabel();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user