X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fmaterial%2FMaterial.java;h=f8fe76a855425a17133d94450dd76bd2dec477af;hb=4d97d149b0ef11eac895be021600613d3f152ad9;hp=912e85cc076f63afdeed7a5cc1f4ab61dab1098c;hpb=eaf924173a9253c8ed192d656982a99e87255de9;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/material/Material.java b/core/src/net/sf/openrocket/material/Material.java index 912e85cc..f8fe76a8 100644 --- a/core/src/net/sf/openrocket/material/Material.java +++ b/core/src/net/sf/openrocket/material/Material.java @@ -30,7 +30,7 @@ public abstract class Material implements Comparable { private final UnitGroup units; private Type(String name, UnitGroup units) { - this.name = name; + this.name = trans.get ("Databases.materials.types." + name); this.units = units; } @@ -218,16 +218,16 @@ public abstract class Material implements Comparable { /** * Return a new user defined material of the specified type and localizable key. */ - public static Material newUserMaterialWithKey(Type type, String key, double density) { + public static Material newUserMaterialWithKey(Type type, String key, String name, double density) { switch (type) { case LINE: - return new Material.Line(null, key, density, true); + return new Material.Line(name, key, density, true); case SURFACE: - return new Material.Surface(null, key, density, true); + return new Material.Surface(name, key, density, true); case BULK: - return new Material.Bulk(null, key, density, true); + return new Material.Bulk(name, key, density, true); default: throw new IllegalArgumentException("Unknown material type: " + type);