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:
authorTon Roosendaal <ton@blender.org>2012-12-26 18:22:04 +0400
committerTon Roosendaal <ton@blender.org>2012-12-26 18:22:04 +0400
commit0bca6c1834e1515cbdc4681621f627eb98563f9f (patch)
tree3727f6d6c43e05a3b2bfe9bc6e4c45548bfbf01c /source/blender/editors/space_view3d
parent86134fd8c6056a568531fff7f71afe95450d97ec (diff)
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 :)
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 6edbd3fb0b3..c72cb2c4d8c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2591,10 +2591,10 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS
/* 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) {