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 | |
parent | 7552972de0a2403d93699ad4a63882080fbde6f3 (diff) |
Numeric Input: preference to default to advanced
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/resources.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/numinput.c | 19 |
2 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index c279c949e62..a2b1aa1f251 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1562,7 +1562,7 @@ void init_userdef_do_versions(Main *bmain) if (!USER_VERSION_ATLEAST(278, 6)) { /* Clear preference flags for re-use. */ U.flag &= ~( - USER_FLAG_DEPRECATED_1 | USER_FLAG_DEPRECATED_2 | USER_FLAG_DEPRECATED_3 | + USER_FLAG_NUMINPUT_ADVANCED | USER_FLAG_DEPRECATED_2 | USER_FLAG_DEPRECATED_3 | USER_FLAG_DEPRECATED_6 | USER_FLAG_DEPRECATED_7 | USER_FLAG_DEPRECATED_9 | USER_DEVELOPER_UI); U.uiflag &= ~( 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: |