Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-12-02 13:33:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-02 14:10:07 +0400
commit1815225faa75eb64e83fdc9f066fcd6339502d52 (patch)
tree6558780d85792c9c41fcf280069870fae70eed7a /source/blender/editors/space_view3d
parentf64ae4cbe5a724496624de9e479c04f325613be5 (diff)
Blender Font (BLF): add length argument to string width/height functions
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 64b747b389b..6aa34baeac6 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -541,7 +541,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
ruler_item_as_string(ruler_item, unit, numstr, sizeof(numstr), prec);
- BLF_width_and_height(blf_mono_font, numstr, &numstr_size[0], &numstr_size[1]);
+ BLF_width_and_height(blf_mono_font, numstr, sizeof(numstr), &numstr_size[0], &numstr_size[1]);
pos[0] = co_ss[1][0] + (cap_size * 2.0f);
pos[1] = co_ss[1][1] - (numstr_size[1] / 2.0f);
@@ -627,7 +627,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
ruler_item_as_string(ruler_item, unit, numstr, sizeof(numstr), prec);
- BLF_width_and_height(blf_mono_font, numstr, &numstr_size[0], &numstr_size[1]);
+ BLF_width_and_height(blf_mono_font, numstr, sizeof(numstr), &numstr_size[0], &numstr_size[1]);
mid_v2_v2v2(pos, co_ss[0], co_ss[2]);