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