When importing a rkt file, if we cannot find the decal image file on the

local disk, we just ignore it.
This commit is contained in:
kruland 2013-12-01 18:22:45 -06:00
parent e0f0befa86
commit 28d970cad6

View File

@ -69,12 +69,13 @@ public class RockSimAppearanceBuilder extends AppearanceBuilder {
if ("file".equals(name)) { if ("file".equals(name)) {
if (value.length() > 0) { if (value.length() > 0) {
final File f = new File(value); final File f = new File(value);
if (!f.exists()) { if (f.exists()) {
//Find out how to get path of current rocksim file Attachment a = context.getAttachmentFactory().getAttachment(name);
//so I can look in it's directory setImage(context.getOpenRocketDocument().getDecalImage(a));
} }
Attachment a = context.getAttachmentFactory().getAttachment(name); // else {
setImage(context.getOpenRocketDocument().getDecalImage(a)); // If we can't find the file on the filesystem, we just ignore the decal.
//}
} }
} else if ("repeat".equals(name)) { } else if ("repeat".equals(name)) {
repeat = "1".equals(value); repeat = "1".equals(value);