diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-22 05:50:40 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-22 05:50:40 +0300 |
commit | 0db45111ce9c504894e0a88dae5f78c03196d233 (patch) | |
tree | 7d826c527c778b14f197bc622200378c0af73ad6 /source/blender/editors/transform | |
parent | e52084ced42bebff2c42838993b5911246ce3460 (diff) |
Transform numeric input: increment initialize input if needed.
Reported by Aligorith on irc
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_numinput.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_numinput.c b/source/blender/editors/transform/transform_numinput.c index e1e86af8a12..cfcf43d69bc 100644 --- a/source/blender/editors/transform/transform_numinput.c +++ b/source/blender/editors/transform/transform_numinput.c @@ -166,11 +166,17 @@ char handleNumInput(NumInput *n, wmEvent *event, float increment) switch (event->type) { case DOWNARROWKEY: /* Increments down*/ - n->val[idx] -= increment; - break; + if (!n->ctrl[idx]) + n->ctrl[idx] = 1; + + n->val[idx] -= increment; + break; case UPARROWKEY: /* Increments up*/ - n->val[idx] += increment; - break; + if (!n->ctrl[idx]) + n->ctrl[idx] = 1; + + n->val[idx] += increment; + break; case BACKSPACEKEY: if (n->ctrl[idx] == 0) { n->val[0] = |