diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-01-19 22:01:48 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-01-19 22:01:48 +0300 |
commit | 4d0bb7de64bd4142e89a7410c3ea2686178048a3 (patch) | |
tree | 27a1b7389e1ff31211656caf902b74a8bbb9d98e /source/blender/editors/space_text | |
parent | efe1af3d11a930b539718cc566049f07316427ff (diff) | |
parent | 075def8fbda709e9db9086e9f2800a56103eb35d (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index fcb675abcf2..62fde49cade 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -596,7 +596,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar) drawcache->total_lines = 0; if (st->showlinenrs) - st->linenrs_tot = (int)floor(log10((float)nlines)) + 1; + st->linenrs_tot = integer_digits_i(nlines); while (line) { if (drawcache->valid_head) { /* we're inside valid head lines */ @@ -630,7 +630,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar) nlines = BLI_listbase_count(&txt->lines); if (st->showlinenrs) - st->linenrs_tot = (int)floor(log10((float)nlines)) + 1; + st->linenrs_tot = integer_digits_i(nlines); } drawcache->total_lines = nlines; |