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:
authorCampbell Barton <ideasman42@gmail.com>2009-08-12 18:11:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-12 18:11:53 +0400
commit45ba3d31c04a8ea3020f5ae24827d2a40ada5f7f (patch)
tree0f2d16615f778fb64d58ab784eb2ad0a38627988 /source/blender/editors/interface
parentfcf883ecf9b90ca859c3fe692dffe4eb37e5e75d (diff)
when units are enabled use them for 3d viewport grid drawing, display the dimension for the smallest grid cell.
still need to make this work with grid snapping.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index a3ae08bbe09..2fe3ac720b6 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1356,7 +1356,7 @@ static float ui_get_but_step_unit(uiBut *but, double value, float step_default)
int unit_type= RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop));
float step;
- step = bUnit_Size(ui_get_but_scale_unit(but, value), U.unit_system, unit_type);
+ step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, value), U.unit_system, unit_type);
if(step > 0.0) { /* -1 is an error value */
return (step/ui_get_but_scale_unit(but, 1.0))*100;