Skip to content

Commit 4baa9f0

Browse files
committed
Merge pull request #5323
a328dd6 [Qt] small changes to sendcoinsdialog (Philip Kaufmann)
2 parents 686fa79 + a328dd6 commit 4baa9f0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
2828
QDialog(parent),
2929
ui(new Ui::SendCoinsDialog),
30-
model(0)
30+
clientModel(0),
31+
model(0),
32+
fNewRecipientAllowed(true),
33+
fFeeMinimized(true)
3134
{
3235
ui->setupUi(this);
3336

@@ -106,13 +109,15 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
106109
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
107110
ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
108111
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
109-
110-
fNewRecipientAllowed = true;
111112
}
112113

113114
void SendCoinsDialog::setClientModel(ClientModel *clientModel)
114115
{
115116
this->clientModel = clientModel;
117+
118+
if (clientModel) {
119+
connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
120+
}
116121
}
117122

118123
void SendCoinsDialog::setModel(WalletModel *model)
@@ -143,7 +148,6 @@ void SendCoinsDialog::setModel(WalletModel *model)
143148
coinControlUpdateLabels();
144149

145150
// fee section
146-
connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
147151
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
148152
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
149153
connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
@@ -460,7 +464,7 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
460464
return true;
461465
}
462466

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,
464468
const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance)
465469
{
466470
Q_UNUSED(unconfirmedBalance);

0 commit comments

Comments
 (0)