diff --git a/pdex/src/processing/mode/experimental/DebugEditor.java b/pdex/src/processing/mode/experimental/DebugEditor.java index 51e7341d1..5ac4a9811 100755 --- a/pdex/src/processing/mode/experimental/DebugEditor.java +++ b/pdex/src/processing/mode/experimental/DebugEditor.java @@ -1083,13 +1083,14 @@ public class DebugEditor extends JavaEditor implements ActionListener { return; try { - if (sketch.isUntitled() && ExperimentalMode.untitledAutoSaveEnabled) { - if (handleSave(true)) - statusTimedNotice("Saved. Running...", 5); - else - statusTimedNotice("Save Canceled. Running anyway...", 5); - } - else if (sketch.isModified())// TODO: Fix ugly UI +// if (sketch.isUntitled() && ExperimentalMode.untitledAutoSaveEnabled) { +// if (handleSave(true)) +// statusTimedNotice("Saved. Running...", 5); +// else +// statusTimedNotice("Save Canceled. Running anyway...", 5); +// } +// else + if (sketch.isModified() && !sketch.isUntitled())// TODO: Fix ugly UI // TODO: Add to preferences { Object[] options = { "Save", "Continue Without Saving" }; diff --git a/pdex/src/processing/mode/experimental/ExperimentalMode.java b/pdex/src/processing/mode/experimental/ExperimentalMode.java index b90b5a519..29941ad87 100755 --- a/pdex/src/processing/mode/experimental/ExperimentalMode.java +++ b/pdex/src/processing/mode/experimental/ExperimentalMode.java @@ -128,14 +128,14 @@ public class ExperimentalMode extends JavaMode { volatile public static boolean errorCheckEnabled = true, warningsEnabled = true, codeCompletionsEnabled = true, debugOutputEnabled = false, errorLogsEnabled = false, - untitledAutoSaveEnabled = false, autoSaveEnabled = true; + autoSaveEnabled = true; //,untitledAutoSaveEnabled; public static int autoSaveInterval = 3; //in minutes public static final String prefErrorCheck = "pdex.errorCheckEnabled", prefWarnings = "pdex.warningsEnabled", prefCodeCompletionEnabled = "pdex.ccEnabled", prefDebugOP = "pdex.dbgOutput", prefErrorLogs = "pdex.writeErrorLogs", prefAutoSaveInterval = "pdex.autoSaveInterval", - prefUntitledAutoSave = "pdex.autoSave.untitledAutoSaveEnabled", prefAutoSave = "pdex.autoSaveEnabled"; + prefAutoSave = "pdex.autoSaveEnabled"; //prefUntitledAutoSave = "pdex.autoSave.untitledAutoSaveEnabled" public void loadPreferences(){ log("Load PDEX prefs"); @@ -146,7 +146,7 @@ public class ExperimentalMode extends JavaMode { DEBUG = Preferences.getBoolean(prefDebugOP); errorLogsEnabled = Preferences.getBoolean(prefErrorLogs); autoSaveInterval = Preferences.getInteger(prefAutoSaveInterval); - untitledAutoSaveEnabled = Preferences.getBoolean(prefUntitledAutoSave); +// untitledAutoSaveEnabled = Preferences.getBoolean(prefUntitledAutoSave); autoSaveEnabled = Preferences.getBoolean(prefAutoSave); } @@ -158,7 +158,7 @@ public class ExperimentalMode extends JavaMode { Preferences.setBoolean(prefDebugOP, DEBUG); Preferences.setBoolean(prefErrorLogs,errorLogsEnabled); Preferences.setInteger(prefAutoSaveInterval,autoSaveInterval); - Preferences.setBoolean(prefUntitledAutoSave,untitledAutoSaveEnabled); +// Preferences.setBoolean(prefUntitledAutoSave,untitledAutoSaveEnabled); Preferences.setBoolean(prefAutoSave,autoSaveEnabled); } @@ -175,8 +175,8 @@ public class ExperimentalMode extends JavaMode { Preferences.setBoolean(prefErrorLogs,errorLogsEnabled); if(Preferences.get(prefAutoSaveInterval) == null) Preferences.setInteger(prefAutoSaveInterval,autoSaveInterval); - if(Preferences.get(prefUntitledAutoSave) == null) - Preferences.setBoolean(prefUntitledAutoSave,untitledAutoSaveEnabled); +// if(Preferences.get(prefUntitledAutoSave) == null) +// Preferences.setBoolean(prefUntitledAutoSave,untitledAutoSaveEnabled); if(Preferences.get(prefAutoSave) == null) Preferences.setBoolean(prefAutoSave,autoSaveEnabled); }