diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 17:31:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 17:32:27 +0300 |
commit | b1c2f4d468c91a257fbc696700521509325aa6f4 (patch) | |
tree | 2b6c5fba416ccc8e654749c5e3995e1c5af9c4e6 /source/blender/editors/util | |
parent | 7552972de0a2403d93699ad4a63882080fbde6f3 (diff) |
Numeric Input: preference to default to advanced
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/numinput.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 8bd5c9640a5..f64182d2ad6 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -276,17 +276,20 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event) short dir = STRCUR_DIR_NEXT, mode = STRCUR_JUMP_NONE; int cur; -#ifndef USE_FAKE_EDIT - if ((event->ctrl == 0) && (event->alt == 0) && (event->ascii != '\0') && - strchr("01234567890@%^&*-+/{}()[]<>.|", event->ascii)) +#ifdef USE_FAKE_EDIT + if (U.flag & USER_FLAG_NUMINPUT_ADVANCED) +#endif { - if (!(n->flag & NUM_EDIT_FULL)) { - n->flag |= NUM_EDITED; - n->flag |= NUM_EDIT_FULL; - n->val_flag[idx] |= NUM_EDITED; + if ((event->ctrl == 0) && (event->alt == 0) && (event->ascii != '\0') && + strchr("01234567890@%^&*-+/{}()[]<>.|", event->ascii)) + { + if (!(n->flag & NUM_EDIT_FULL)) { + n->flag |= NUM_EDITED; + n->flag |= NUM_EDIT_FULL; + n->val_flag[idx] |= NUM_EDITED; + } } } -#endif switch (event->type) { case EVT_MODAL_MAP: |