Fix document loading/saving
This commit is contained in:
parent
a1f6782195
commit
79fd36dc9f
@ -219,6 +219,8 @@ public class OpenRocketSaver extends RocketSaver {
|
||||
*/
|
||||
private int calculateNecessaryFileVersion(OpenRocketDocument document, StorageOptions opts) {
|
||||
/*
|
||||
* NOTE: Remember to update the supported versions in DocumentConfig as well!
|
||||
*
|
||||
* File version 1.7 is required for:
|
||||
* - simulation extensions
|
||||
*
|
||||
@ -553,7 +555,7 @@ public class OpenRocketSaver extends RocketSaver {
|
||||
} else if (value instanceof Number) {
|
||||
writeln("<entry " + keyAttr + "type=\"number\">" + value + "</entry>");
|
||||
} else if (value instanceof String) {
|
||||
writeln("<entry " + keyAttr + "type=\"string\">" + value + "</entry>");
|
||||
writeln("<entry " + keyAttr + "type=\"string\">" + TextUtil.escapeXML((String) value) + "</entry>");
|
||||
} else if (value instanceof List) {
|
||||
List<?> list = (List<?>) value;
|
||||
writeln("<entry " + keyAttr + "type=\"list\">");
|
||||
|
@ -48,7 +48,7 @@ import net.sf.openrocket.util.Reflection;
|
||||
class DocumentConfig {
|
||||
|
||||
/* Remember to update OpenRocketSaver as well! */
|
||||
public static final String[] SUPPORTED_VERSIONS = { "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6" };
|
||||
public static final String[] SUPPORTED_VERSIONS = { "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7" };
|
||||
|
||||
/**
|
||||
* Divisor used in converting an integer version to the point-represented version.
|
||||
|
Loading…
x
Reference in New Issue
Block a user