- before it was possible to use the steps to change e.g. amouns of authenticated or unauthenticated payment requests (AmountSpinBox is already set to read-only here) - this is now fixed
- also move the reimplemented stepEnabled() function to the protected section of our class, where it belongs (see Qt doc)
[Qt] don't allow amount changes when AmountSpinBox is read-only #5637
pull Diapolo wants to merge 2 commits into bitcoin:master from Diapolo:amountspinbox changing 1 files +22 −17-
Diapolo commented at 2:06 PM on January 10, 2015: none
-
0fd9e2bf43
[Qt] don't allow amount changes when AmountSpinBox is read-only
- before it was possible to use the steps to change e.g. amouns of authenticated or unauthenticated payment requests (AmountSpinBox is already set to read-only here) - this is now fixed - also move the reimplemented stepEnabled() function to the protected section of our class, where it belongs (see Qt doc)
- laanwj added the label GUI on Jan 11, 2015
-
Diapolo commented at 7:06 PM on January 11, 2015: none
@jonasschnelli Mind testing this :)?
-
jonasschnelli commented at 7:14 PM on January 11, 2015: contributor
@Diapolo Yes. Will test this soon (tomorrow).
-
jonasschnelli commented at 9:30 AM on January 12, 2015: contributor
Tested ACK.

The only strange thing is, that
StepEnabled stepEnabled() constgets called basically every second in serval app states. But i assume that's Qt internal. Check: http://jonasschnelli.ch/vid_5637.mov -
[Qt] group variables below initial if-clauses in AmountSpinBox::stepEnabled 80dd50ccba
-
in src/qt/bitcoinamountfield.cpp:None in 0fd9e2bf43 outdated
163 | @@ -179,6 +164,25 @@ class AmountSpinBox: public QAbstractSpinBox 164 | return QAbstractSpinBox::event(event); 165 | } 166 | 167 | + StepEnabled stepEnabled() const 168 | + { 169 | + StepEnabled rv = 0; 170 | + if (isReadOnly()) // Disable steps when AmountSpinBox is read-only 171 | + return StepNone; 172 | + if(text().isEmpty()) // Allow step-up with empty field
jonasschnelli commented at 9:31 AM on January 12, 2015:some spaced after if nits but i assume we discussed that... but i was looking forward to once 'nit' you. :)
Diapolo commented at 9:35 AM on January 12, 2015:Haha :), got me. Well the only reason I did not add a space was because the surrounding if clauses also have the wrong style ^^.
Diapolo commented at 10:54 AM on January 13, 2015:@jonasschnelli As I picked up a small suggestion, I also fixed your nit ^^. Can you Re-ACK this now?
jonasschnelli commented at 11:09 AM on January 13, 2015: contributorACK
laanwj merged this on Jan 14, 2015laanwj closed this on Jan 14, 2015laanwj referenced this in commit eec81cbb80 on Jan 14, 2015Diapolo deleted the branch on Jan 15, 2015laanwj referenced this in commit 6a02ef8bdb on Jan 30, 2015reddink referenced this in commit a54d5d02bf on May 27, 2020DrahtBot locked this on Sep 8, 2021ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me