[Bf-blender-cvs] [e751ee5] master: Fix minor order of init error w/ text draw

Campbell Barton noreply at git.blender.org
Tue Dec 1 09:07:38 CET 2015


Commit: e751ee55269dbfc19a99c439f635cc36be2ed16b
Author: Campbell Barton
Date:   Tue Dec 1 19:00:55 2015 +1100
Branches: master
https://developer.blender.org/rBe751ee55269dbfc19a99c439f635cc36be2ed16b

Fix minor order of init error w/ text draw

===================================================================

M	source/blender/editors/space_text/text_draw.c

===================================================================

diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 0ffd40d..1608792 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1347,8 +1347,6 @@ void draw_text_main(SpaceText *st, ARegion *ar)
 	int i, x, y, winx, linecount = 0, lineno = 0;
 	int wraplinecount = 0, wrap_skip = 0;
 	int margin_column_x;
-	/* don't draw lines below this */
-	const int clip_min_y = -(int)(st->lheight_dpi - 1);
 
 	/* if no text, nothing to do */
 	if (!text)
@@ -1356,6 +1354,10 @@ void draw_text_main(SpaceText *st, ARegion *ar)
 
 	/* dpi controlled line height and font size */
 	st->lheight_dpi = (U.widget_unit * st->lheight) / 20;
+
+	/* don't draw lines below this */
+	const int clip_min_y = -(int)(st->lheight_dpi - 1);
+
 	st->viewlines = (st->lheight_dpi) ? (int)(ar->winy - clip_min_y) / (st->lheight_dpi + TXT_LINE_SPACING) : 0;
 	
 	text_draw_context_init(st, &tdc);




More information about the Bf-blender-cvs mailing list