From 9a5507fd075642ebbe2f12293624196b4e384167 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 26 Dec 2009 15:42:30 +0000 Subject: [PATCH] Saving immediately when replacing a sketch with another in the same editor. Should fix bug: http://code.google.com/p/arduino/issues/detail?id=88 --- app/src/processing/app/Base.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 3a73e4a41..05febcc4f 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -584,7 +584,7 @@ public class Base { * Replace the sketch in the current window with a new untitled document. */ public void handleNewReplace() { - if (!activeEditor.checkModified(false)) { + if (!activeEditor.checkModified(true)) { return; // sketch was modified, and user canceled } // Close the running window, avoid window boogers with multiple sketches @@ -616,7 +616,7 @@ public class Base { * @param path Location of the primary pde file for the sketch. */ public void handleOpenReplace(String path) { - if (!activeEditor.checkModified(false)) { + if (!activeEditor.checkModified(true)) { return; // sketch was modified, and user canceled } // Close the running window, avoid window boogers with multiple sketches