loading prev save and restore too? Decisions

This commit is contained in:
Manindra Moharana
2014-01-12 20:04:03 +05:30
parent 7cb301e3b0
commit ebaab69e2a
2 changed files with 12 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ public class AutoSaveUtil {
public void init(){
if(saveTime < 1000) return;
saveTime = 10 * 1000;
saveTime = 10 * 1000; //TODO: remove
timer = new Timer();
timer.schedule(new SaveTask(), saveTime, saveTime);
isSaving = false;
@@ -64,7 +64,7 @@ public class AutoSaveUtil {
public void stop(){
while(isSaving); // save operation mustn't be interrupted
if(timer != null) timer.cancel();
//Base.removeDir(autosaveDir);
Base.removeDir(autosaveDir);
}
private boolean saveSketch() throws IOException{
@@ -216,7 +216,7 @@ public class AutoSaveUtil {
public void run() {
try {
saveSketch();
ExperimentalMode.log("Saved " + editor.getSketch().getMainFilePath());
ExperimentalMode.log("Backup Saved " + editor.getSketch().getMainFilePath());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();