[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53329] trunk/blender/source/blender/ editors/space_view3d/drawobject.c: Bug fix #33673

Ton Roosendaal ton at blender.org
Wed Dec 26 15:22:04 CET 2012


Revision: 53329
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53329
Author:   ton
Date:     2012-12-26 14:22:04 +0000 (Wed, 26 Dec 2012)
Log Message:
-----------
Bug fix #33673

Edge length display in standard files (1 blender unit == 1) only gave two
numbers precision for lengths > 1. Three is much nicer at least.

The guess-work here in the code remains a bit dubious :)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-12-26 13:57:07 UTC (rev 53328)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-12-26 14:22:04 UTC (rev 53329)
@@ -2591,10 +2591,10 @@
 
 	/* make the precision of the display value proportionate to the gridsize */
 
-	if (grid < 0.01f) conv_float = "%.6g";
-	else if (grid < 0.1f) conv_float = "%.5g";
-	else if (grid < 1.0f) conv_float = "%.4g";
-	else if (grid < 10.0f) conv_float = "%.3g";
+	if (grid <= 0.01f) conv_float = "%.6g";
+	else if (grid <= 0.1f) conv_float = "%.5g";
+	else if (grid <= 1.0f) conv_float = "%.4g";
+	else if (grid <= 10.0f) conv_float = "%.3g";
 	else conv_float = "%.2g";
 	
 	if (me->drawflag & ME_DRAWEXTRA_EDGELEN) {




More information about the Bf-blender-cvs mailing list