diff options
Diffstat (limited to 'source/blender/editors/util/numinput.c')
-rw-r--r-- | source/blender/editors/util/numinput.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index c69996defd7..57ae95d1305 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -166,9 +166,8 @@ void applyNumInput(NumInput *n, float *vec) static void value_to_editstr(NumInput *n, int idx) { const int prec = 6; /* editing, higher precision needed. */ - bUnit_AsString(n->str, NUM_STR_REP_LEN, (double)n->val[idx], prec, - n->unit_sys, n->unit_type[idx], true, false); - n->str_cur = strlen(n->str); + n->str_cur = bUnit_AsString(n->str, NUM_STR_REP_LEN, (double)n->val[idx], prec, + n->unit_sys, n->unit_type[idx], true, false); } static bool editstr_insert_at_cursor(NumInput *n, const char *buf, const int buf_len) |