diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-15 15:59:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-15 15:59:16 +0400 |
commit | 4725941f2338e1b2a919f1dafd00ff283a47766a (patch) | |
tree | b10ff123f7d65e0e44f180ccf65038d06c523b41 /source | |
parent | aafe6322fe0f018f58898a50c8d6557cc0ea0218 (diff) |
Fix for cursor location with xoffset & flush alignment
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 88c2b251b9d..109d79127ca 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -822,9 +822,12 @@ makebreak: } } else if ((cu->spacemode == CU_FLUSH) && (cu->tb[0].w != 0.0f)) { - for (i = 0; i < lnr; i++) - if (linedata2[i] > 1) - linedata[i] = ((linedata3[i] - linedata[i]) + cu->xof) / (linedata2[i] - 1); + for (i = 0; i < lnr; i++) { + linedata[i] = ((linedata3[i] - linedata[i]) + cu->xof); + if (linedata2[i] > 1) { + linedata[i] /= (linedata2[i] - 1); + } + } for (i = 0; i <= slen; i++) { for (j = i; (!ELEM(mem[j], '\0', '\n')) && (chartransdata[j].dobreak == 0) && (j < slen); j++) { /* do nothing */ |