Unit System: remove 'm' as an alternate name for mile
authorCampbell Barton <ideasman42@gmail.com>
Wed, 12 Jun 2019 04:20:59 +0000 (14:20 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 12 Jun 2019 04:25:05 +0000 (14:25 +1000)
Now when using imperial dimensions,
using 'm' suffix is treated as meters instead of miles
(use 'mi' or 'mile' instead).

Resolves T65731

source/blender/blenkernel/intern/unit.c

index f5b73d8..7e7d5c8 100644 (file)
@@ -157,7 +157,7 @@ static struct bUnitDef buMetricLenDef[] = {
 static const struct bUnitCollection buMetricLenCollection = {buMetricLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricLenDef)};
 
 static struct bUnitDef buImperialLenDef[] = {
-  {"mile",    "miles",    "mi",   "m",  "Miles",    "MILES",    UN_SC_MI,  0.0, B_UNIT_DEF_NONE},
+  {"mile",    "miles",    "mi",   NULL, "Miles",    "MILES",    UN_SC_MI,  0.0, B_UNIT_DEF_NONE},
   {"furlong", "furlongs", "fur",  NULL, "Furlongs", "FURLONGS", UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
   {"chain",   "chains",   "ch",   NULL, "Chains",   "CHAINS",   UN_SC_CH,  0.0, B_UNIT_DEF_SUPPRESS},
   {"yard",    "yards",    "yd",   NULL, "Yards",    "YARDS",    UN_SC_YD,  0.0, B_UNIT_DEF_SUPPRESS},