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>2010-09-22 06:44:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-22 06:44:03 +0400
commite4f3a0efa6cc2fdb6762adb4e9d534b33978cf81 (patch)
treecca946d7c6df98bd3df2de53101b887f567d6693 /source/blender/blenkernel/intern/unit.c
parentb0f36f0317a3b4529f325d6ed96c91d36c22f557 (diff)
patch [#23796] Full support for unit buttons: area, volume, mass, velocity and acceleration
from Lorenzo Tozzi (oni_niubbo), multiple patches: better_split.diff
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r--source/blender/blenkernel/intern/unit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 75be48cc885..de22a0e347c 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -395,8 +395,9 @@ void bUnit_AsString(char *str, int len_max, double value, int prec, int system,
if(usys==NULL || usys->units[0].name==NULL)
usys= &buDummyCollecton;
-
- if(split) {
+
+ /* split output makes sense only for length, mass and time */
+ if(split && (type==B_UNIT_LENGTH || type==B_UNIT_MASS || type==B_UNIT_TIME)) {
int i;
bUnitDef *unit_a, *unit_b;
double value_a, value_b;