aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorbpay <bpay@users.noreply.github.com>2018-12-13 23:39:05 -0500
committerfanquake <fanquake@gmail.com>2019-08-23 19:20:48 +0800
commita4765bd77f9bc5c4d5c866ee6940807522741941 (patch)
tree7ea5c9fa525d13ac6ae78b1c26fc40ab1abd5881 /src/qt/sendcoinsdialog.cpp
parent442a9c64775454a7073aff9872721c58b1dd35c5 (diff)
downloadbitcoin-a4765bd77f9bc5c4d5c866ee6940807522741941.tar.xz
gui: Ensure tx send error highlight is visible
If sending to multiple recipients and one of the recipient fields is malformed, the highlighted field may not be visible due to being scrolled out of view, leading to a confusing lack of error feedback when clicking Send. To avoid this problem ensure the first field containing an error is scrolled into view when Send is clicked.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 193fba78b1..0ed057bc8b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -230,8 +230,9 @@ void SendCoinsDialog::on_sendButton_clicked()
{
recipients.append(entry->getValue());
}
- else
+ else if (valid)
{
+ ui->scrollArea->ensureWidgetVisible(entry);
valid = false;
}
}