mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
fix clear() (clear red/invalid status)
This commit is contained in:
parent
174b3eddc0
commit
73cd5e5212
@ -55,6 +55,12 @@ void BitcoinAmountField::setText(const QString &text)
|
||||
}
|
||||
}
|
||||
|
||||
void BitcoinAmountField::clear()
|
||||
{
|
||||
amount->clear();
|
||||
decimals->clear();
|
||||
}
|
||||
|
||||
bool BitcoinAmountField::validate()
|
||||
{
|
||||
bool valid = true;
|
||||
|
@ -18,6 +18,8 @@ public:
|
||||
|
||||
void setText(const QString &text);
|
||||
QString text() const;
|
||||
|
||||
void clear();
|
||||
bool validate();
|
||||
// Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907)
|
||||
// Hence we have to set it up manually
|
||||
|
@ -35,3 +35,9 @@ void QValidatedLineEdit::markValid()
|
||||
{
|
||||
setValid(true);
|
||||
}
|
||||
|
||||
void QValidatedLineEdit::clear()
|
||||
{
|
||||
setValid(true);
|
||||
QLineEdit::clear();
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ class QValidatedLineEdit : public QLineEdit
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QValidatedLineEdit(QWidget *parent = 0);
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent *evt);
|
||||
|
@ -68,7 +68,7 @@ void SendCoinsEntry::clear()
|
||||
{
|
||||
ui->payTo->clear();
|
||||
ui->addAsLabel->clear();
|
||||
ui->payAmount->setText(QString());
|
||||
ui->payAmount->clear();
|
||||
ui->payTo->setFocus();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user