mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
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
This commit is contained in:
parent
def86681b7
commit
9a5507fd07
@ -584,7 +584,7 @@ public class Base {
|
|||||||
* Replace the sketch in the current window with a new untitled document.
|
* Replace the sketch in the current window with a new untitled document.
|
||||||
*/
|
*/
|
||||||
public void handleNewReplace() {
|
public void handleNewReplace() {
|
||||||
if (!activeEditor.checkModified(false)) {
|
if (!activeEditor.checkModified(true)) {
|
||||||
return; // sketch was modified, and user canceled
|
return; // sketch was modified, and user canceled
|
||||||
}
|
}
|
||||||
// Close the running window, avoid window boogers with multiple sketches
|
// 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.
|
* @param path Location of the primary pde file for the sketch.
|
||||||
*/
|
*/
|
||||||
public void handleOpenReplace(String path) {
|
public void handleOpenReplace(String path) {
|
||||||
if (!activeEditor.checkModified(false)) {
|
if (!activeEditor.checkModified(true)) {
|
||||||
return; // sketch was modified, and user canceled
|
return; // sketch was modified, and user canceled
|
||||||
}
|
}
|
||||||
// Close the running window, avoid window boogers with multiple sketches
|
// Close the running window, avoid window boogers with multiple sketches
|
||||||
|
Loading…
Reference in New Issue
Block a user