mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 03:59:29 +00:00
Send: focus amount field on fill
This commit is contained in:
parent
a49a31ad86
commit
a7333e5065
3 changed files with 7 additions and 10 deletions
|
@ -885,8 +885,8 @@ void MainWindow::payToMany() {
|
|||
"A maximum of 16 addresses may be specified.");
|
||||
}
|
||||
|
||||
void MainWindow::showSendScreen(const CCSEntry &entry) {
|
||||
m_sendWidget->fill(entry);
|
||||
void MainWindow::showSendScreen(const CCSEntry &entry) { // TODO: rename this function
|
||||
m_sendWidget->fill(entry.address, QString("CCS: %1").arg(entry.title));
|
||||
ui->tabWidget->setCurrentIndex(Tabs::SEND);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ Q_OBJECT
|
|||
|
||||
public:
|
||||
explicit SendWidget(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
|
||||
void fill(const CCSEntry &entry);
|
||||
void fill(const QString &address, const QString &description, double amount = 0);
|
||||
void fill(double amount);
|
||||
void clearFields();
|
||||
|
|
Loading…
Reference in a new issue