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.
This commit is contained in:
bpay 2018-12-13 23:39:05 -05:00 committed by fanquake
parent 442a9c6477
commit a4765bd77f
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -230,8 +230,9 @@ void SendCoinsDialog::on_sendButton_clicked()
{
recipients.append(entry->getValue());
}
else
else if (valid)
{
ui->scrollArea->ensureWidgetVisible(entry);
valid = false;
}
}