Skip to content

Commit 80dd50c

Browse files
author
Philip Kaufmann
committed
[Qt] group variables below initial if-clauses in AmountSpinBox::stepEnabled
1 parent 0fd9e2b commit 80dd50c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/qt/bitcoinamountfield.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,12 @@ class AmountSpinBox: public QAbstractSpinBox
166166

167167
StepEnabled stepEnabled() const
168168
{
169-
StepEnabled rv = 0;
170169
if (isReadOnly()) // Disable steps when AmountSpinBox is read-only
171170
return StepNone;
172-
if(text().isEmpty()) // Allow step-up with empty field
171+
if (text().isEmpty()) // Allow step-up with empty field
173172
return StepUpEnabled;
173+
174+
StepEnabled rv = 0;
174175
bool valid = false;
175176
CAmount val = value(&valid);
176177
if(valid)

0 commit comments

Comments
 (0)