Skip to content

Commit

Permalink
GUI: Emit BitcoinAmountField::valueChanged when unit changes even if …
Browse files Browse the repository at this point in the history
…the current value is invalid
  • Loading branch information
luke-jr authored and instagibbs committed Apr 10, 2019
1 parent 954f775 commit 1f0b688
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/qt/bitcoinamountfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,15 @@ class AmountSpinBox: public QAbstractSpinBox
if (!was_pegged) {
// Leave the text as-is, if it's valid
value(&valid);
if (valid) {
Q_EMIT valueChanged();
} else {
if (!valid) {
clear();
}
} else
if(valid)
setValue(val);
else
clear();
Q_EMIT valueChanged();
}

void setSingleStep(const CAmount& step)
Expand Down

0 comments on commit 1f0b688

Please sign in to comment.