Send: focus amount field on fill

This commit is contained in:
tobtoht
2021-07-02 18:01:11 +02:00
parent a49a31ad86
commit a7333e5065
3 changed files with 7 additions and 10 deletions
+4 -6
View File
@@ -87,22 +87,20 @@ void SendWidget::amountEdited(const QString &text) {
this->updateConversionLabel();
}
void SendWidget::fill(const CCSEntry &entry) {
this->fill(entry.address, QString("CCS: %1").arg(entry.title), 0.0);
}
void SendWidget::fill(double amount) {
ui->lineAmount->setText(QString::number(amount));
}
void SendWidget::fill(const QString &address, const QString &description, double amount) {
ui->lineDescription->setText(description);
ui->lineAddress->setText(address);
ui->lineAddress->moveCursor(QTextCursor::Start);
ui->lineDescription->setText(description);
if (amount > 0)
ui->lineAmount->setText(QString::number(amount));
ui->lineAmount->setFocus();
this->updateConversionLabel();
}