|
27 | 27 | SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
|
28 | 28 | QDialog(parent),
|
29 | 29 | ui(new Ui::SendCoinsDialog),
|
30 |
| - model(0) |
| 30 | + clientModel(0), |
| 31 | + model(0), |
| 32 | + fNewRecipientAllowed(true), |
| 33 | + fFeeMinimized(true) |
31 | 34 | {
|
32 | 35 | ui->setupUi(this);
|
33 | 36 |
|
@@ -106,13 +109,15 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
|
106 | 109 | ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
|
107 | 110 | ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
|
108 | 111 | minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
|
109 |
| - |
110 |
| - fNewRecipientAllowed = true; |
111 | 112 | }
|
112 | 113 |
|
113 | 114 | void SendCoinsDialog::setClientModel(ClientModel *clientModel)
|
114 | 115 | {
|
115 | 116 | this->clientModel = clientModel;
|
| 117 | + |
| 118 | + if (clientModel) { |
| 119 | + connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel())); |
| 120 | + } |
116 | 121 | }
|
117 | 122 |
|
118 | 123 | void SendCoinsDialog::setModel(WalletModel *model)
|
@@ -143,7 +148,6 @@ void SendCoinsDialog::setModel(WalletModel *model)
|
143 | 148 | coinControlUpdateLabels();
|
144 | 149 |
|
145 | 150 | // fee section
|
146 |
| - connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel())); |
147 | 151 | connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
|
148 | 152 | connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
|
149 | 153 | connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
@@ -460,7 +464,7 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
|
460 | 464 | return true;
|
461 | 465 | }
|
462 | 466 |
|
463 |
| -void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, |
| 467 | +void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, |
464 | 468 | const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance)
|
465 | 469 | {
|
466 | 470 | Q_UNUSED(unconfirmedBalance);
|
|
0 commit comments