Allowing (and fixing) uploading of unsaved sketches.

This commit is contained in:
David A. Mellis 2009-06-16 19:49:28 +00:00
parent 3b09a2ad1d
commit 672ad5648e
3 changed files with 7 additions and 1 deletions

View File

@ -2146,7 +2146,7 @@ public class Editor extends JFrame implements RunnerListener {
* hitting export twice, quickly, and horking things up.
*/
synchronized public void handleExport() {
if (!handleExportCheckModified()) return;
//if (!handleExportCheckModified()) return;
toolbar.activate(EditorToolbar.EXPORT);
console.clear();

View File

@ -1392,8 +1392,11 @@ public class Sketch {
// Make sure the user didn't hide the sketch folder
ensureExistence();
current.setProgram(editor.getText());
// Reload the code when an external editor is being used
if (Preferences.getBoolean("editor.external")) {
current = null;
// nuke previous files and settings
load();
}

View File

@ -9,6 +9,8 @@ Add library keyword highlighting.
Allow closing of the serial monitor with keyboard short cuts.
Clear serial monitor button when the serial monitor opens.
Support libraries in the SKETCH/code folder?
Get rid of unused preferences in the preferences dialog.
@ -44,6 +46,7 @@ Compiler.java
Sketch.java
- add system-wide include path in preprocess()?
- should find libraries in the code/ sub-folder of the sketch folder
- do sketches really need to get built in the applet/ sub-folder when uploading?
PreProcessor.java
- split write() into writeHeader() and write() as in Processing?