[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55461] trunk/blender/source/blender: Bugfix: Transform autokey warning indicator text was getting clipped prematurely

Joshua Leung aligorith at gmail.com
Thu Mar 21 12:14:54 CET 2013


Revision: 55461
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55461
Author:   aligorith
Date:     2013-03-21 11:14:53 +0000 (Thu, 21 Mar 2013)
Log Message:
-----------
Bugfix: Transform autokey warning indicator text was getting clipped prematurely

After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.

Modified Paths:
--------------
    trunk/blender/source/blender/blenfont/intern/blf.c
    trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/blenfont/intern/blf.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf.c	2013-03-21 08:47:18 UTC (rev 55460)
+++ trunk/blender/source/blender/blenfont/intern/blf.c	2013-03-21 11:14:53 UTC (rev 55461)
@@ -619,6 +619,7 @@
 		return;
 	}
 
+	BLF_size(global_font_default, global_font_points, global_font_dpi);
 	BLF_width_and_height(global_font_default, str, width, height);
 }
 

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2013-03-21 08:47:18 UTC (rev 55460)
+++ trunk/blender/source/blender/editors/transform/transform.c	2013-03-21 11:14:53 UTC (rev 55461)
@@ -1685,7 +1685,7 @@
 static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *ar)
 {
 	rcti rect;
-	const char *printable = IFACE_("Auto Keying On");
+	const char printable[] = IFACE_("Auto Keying On");
 	float      printable_size[2];
 	int xco, yco;
 




More information about the Bf-blender-cvs mailing list