From b9114cb609698bdd40175b79c017b8ec8d10b518 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Jan 2014 17:16:19 +1100 Subject: UI: Use bool rather then int/short's where possible --- source/blender/editors/util/numinput.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/util/numinput.c') 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) -- cgit v1.2.3