aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-08-24 08:50:12 +0800
committerfanquake <fanquake@gmail.com>2019-08-24 08:54:19 +0800
commitd86a906a884034e6b817399b4aeb29e9e0b1e131 (patch)
tree7ea5c9fa525d13ac6ae78b1c26fc40ab1abd5881
parent442a9c64775454a7073aff9872721c58b1dd35c5 (diff)
parenta4765bd77f9bc5c4d5c866ee6940807522741941 (diff)
downloadbitcoin-d86a906a884034e6b817399b4aeb29e9e0b1e131.tar.xz
Merge #16694: gui: Ensure transaction send error is always visible
a4765bd77f9bc5c4d5c866ee6940807522741941 gui: Ensure tx send error highlight is visible (bpay) Pull request description: Rebased and squashed #14956. > 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. This results in a confusing lack of error feedback. > Avoid this problem by ensuring the first field containing an error is scrolled into view when Send is clicked. You can see the behavior here: https://imgur.com/a/QZG5TQc How to test: Add a few recipients and give any of them an invalid address or amount. Scroll the invalid recipient out of view and hit Send. With this change, the GUI will scroll to show the invalid recipient, with master it will not, "hiding" the error. ACKs for top commit: jonatack: Tested ACK a4765bd77f9bc5c4d5c866ee6940807522741941 on Linux Debian with Qt 5.11.3. Change is that I had added an inadvertent typo in my make bash alias; fixed. hebasto: ACK a4765bd77f9bc5c4d5c866ee6940807522741941, tested on Debian 9.9 with system Qt 5.7.1. Tree-SHA512: a5653ca44d6d540214bdb424b0b75a06a5872cff41b0cd8cffd9cef99ebf04a17a3652e561139ac75315b39c3347e5f7ae304fa35e14b48bdae4768a416df9b0
-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;
}
}