import net.sf.openrocket.aerodynamics.WarningSet;\r
import net.sf.openrocket.document.OpenRocketDocument;\r
import net.sf.openrocket.document.Simulation;\r
+import net.sf.openrocket.document.StorageOptions;\r
import net.sf.openrocket.file.openrocket.OpenRocketSaver;\r
import net.sf.openrocket.rocketcomponent.Rocket;\r
import android.net.Uri;\r
\r
public void addNewSimulation() {\r
Rocket rocket = rocketDocument.getRocket();\r
- Simulation newSim = new Simulation(rocket);\r
+ // FIXME - hopefully the change to the Simulation object will be reverted soon.\r
+ Simulation newSim = new Simulation(rocketDocument, rocket);\r
newSim.setName(rocketDocument.getNextSimulationName());\r
rocketDocument.addSimulation(newSim);\r
notifySimsChanged();\r
\r
public void saveOpenRocketDocument() throws IOException {\r
OpenRocketSaver saver = new OpenRocketSaver();\r
- saver.save(new File(fileUri.getPath()),rocketDocument);\r
+ StorageOptions options = new StorageOptions();\r
+ options.setCompressionEnabled(true);\r
+ options.setSimulationTimeSkip(StorageOptions.SIMULATION_DATA_ALL);\r
+ saver.save(new File(fileUri.getPath()),rocketDocument,options);\r
\r
}\r
\r