git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@569
180e2498-e6e9-4542-8430-
84ac67f01cd8
String translated_value = Application.getTranslator().get("Databases.materials.Paperoffice");
return getMaterialFor(translated_value);
}
- throw new IllegalArgumentException("Invalid material " + value + " in component preset.");
+ try {
+ return getMaterialFor(value);
+ }
+ catch (IllegalArgumentException ex ) {
+ // FIXME - what can we do if the material in the file is not defined?
+ Material m = new Material.Bulk(value, 0, true);
+ return m;
+ }
}
if ( type.equals(Shape.class) ) {
//FIXME - ignore case!