Only auto save when saving is enabled (to prevent the possible race condition).

This commit is contained in:
Kevin Ruland 2012-07-13 14:04:46 +00:00
parent 18851005a1
commit ae8e9c9d13

View File

@ -227,7 +227,7 @@ implements Simulations.OnSimulationSelectedListener, OpenRocketSaverFragment.OnO
@Override
protected void doSimComplete() {
if ( autoSaveEnabled ) {
if ( autoSaveEnabled && CurrentRocketHolder.getCurrentRocket().canSave() ) {
Toast.makeText(OpenRocketViewer.this, R.string.autoSaveMessage, Toast.LENGTH_SHORT).show();
OpenRocketViewer.this.saveRocketDocument();
}