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:
authorHarley Acheson <harley.acheson@gmail.com>2021-06-09 23:37:44 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-06-09 23:39:08 +0300
commit5f19646d7edef02479bccd7e898f072c9e54ac6e (patch)
treef25e19443fc9756a69bf397a72e4e7d6d1c45210 /source/blender/editors/space_info/info_stats.c
parent675677ec67c6b922b3a5e602c8bf3dbb562bd687 (diff)
Fix T88799: 3DViewport Stats Column Measurements
To draw the overlay stats in columns the strings must be measured to find the longest one. In some circumstances this measurement can be incorrect. We draw the text with a specific size yet do not explicitly set the size before calling BLF_size. This patch properly sets the size so that the measurement will match what will be used for output. See T88799 for examples of measurement failure. Differential Revision: https://developer.blender.org/D11504 Reviewed by Hans Goudey
Diffstat (limited to 'source/blender/editors/space_info/info_stats.c')
-rw-r--r--source/blender/editors/space_info/info_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index cf847fa18a8..ebdf32a1cdb 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -693,7 +693,7 @@ void ED_info_draw_stats(
Object *ob = OBACT(view_layer);
Object *obedit = OBEDIT_FROM_OBACT(ob);
eObjectMode object_mode = ob ? ob->mode : OB_MODE_OBJECT;
- const int font_id = BLF_default();
+ const int font_id = BLF_set_default();
UI_FontThemeColor(font_id, TH_TEXT_HI);
BLF_enable(font_id, BLF_SHADOW);