Added fixme in version check. Need to add test for flight

configurations.
This commit is contained in:
kruland2607 2013-03-16 18:21:27 -05:00
parent 2cfd46760d
commit c882ff2e19

View File

@ -205,7 +205,7 @@ public class OpenRocketSaver extends RocketSaver {
private int calculateNecessaryFileVersion(OpenRocketDocument document, StorageOptions opts) { private int calculateNecessaryFileVersion(OpenRocketDocument document, StorageOptions opts) {
/* /*
* File version 1.6 is required for: * File version 1.6 is required for:
* - saving files using appearances and textures * - saving files using appearances and textures, flight configurations.
* *
* File version 1.5 is requires for: * File version 1.5 is requires for:
* - saving designs using ComponentPrests * - saving designs using ComponentPrests
@ -223,11 +223,12 @@ public class OpenRocketSaver extends RocketSaver {
* Otherwise use version 1.0. * Otherwise use version 1.0.
*/ */
// Search the rocket for any Appearnces (version 1.6) // Search the rocket for any Appearnces or non-motor flight configurations (version 1.6)
for (RocketComponent c : document.getRocket()) { for (RocketComponent c : document.getRocket()) {
if (c.getAppearance() != null) { if (c.getAppearance() != null) {
return FILE_VERSION_DIVISOR + 6; return FILE_VERSION_DIVISOR + 6;
} }
// FIXME - test for flight configurations
} }
// Search the rocket for any ComponentPresets (version 1.5) // Search the rocket for any ComponentPresets (version 1.5)