aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 6d32891172..0d9a604d3b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -30,6 +30,8 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry()));
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
+
+ fNewRecipientAllowed = true;
}
void SendCoinsDialog::setModel(WalletModel *model)
@@ -92,6 +94,8 @@ void SendCoinsDialog::on_sendButton_clicked()
formatted.append(tr("<b>%1</b> to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), Qt::escape(rcp.label), rcp.address));
}
+ fNewRecipientAllowed = false;
+
QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"),
tr("Are you sure you want to send %1?").arg(formatted.join(tr(" and "))),
QMessageBox::Yes|QMessageBox::Cancel,
@@ -99,6 +103,7 @@ void SendCoinsDialog::on_sendButton_clicked()
if(retval != QMessageBox::Yes)
{
+ fNewRecipientAllowed = true;
return;
}
@@ -106,6 +111,7 @@ void SendCoinsDialog::on_sendButton_clicked()
if(!ctx.isValid())
{
// Unlock wallet was cancelled
+ fNewRecipientAllowed = true;
return;
}
@@ -152,6 +158,7 @@ void SendCoinsDialog::on_sendButton_clicked()
accept();
break;
}
+ fNewRecipientAllowed = true;
}
void SendCoinsDialog::clear()
@@ -236,6 +243,9 @@ QWidget *SendCoinsDialog::setupTabChain(QWidget *prev)
void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
{
+ if (!fNewRecipientAllowed)
+ return;
+
SendCoinsEntry *entry = 0;
// Replace the first entry if it is still unused
if(ui->entries->count() == 1)