1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

Do not auto-save on verify/upload if sketch is readonly

This commit is contained in:
Cristian Maglie 2014-11-09 20:38:16 +01:00
parent 5a6af2cf02
commit 9a441d6dae

View File

@ -1888,7 +1888,7 @@ public class Editor extends JFrame implements RunnerListener {
public void handleRun(final boolean verbose) {
internalCloseRunner();
if (Preferences.getBoolean("save.verifyUpload")) {
if (sketch.isModified()) {
if (sketch.isModified() && !sketch.isReadOnly()) {
handleSave(true);
}
}
@ -2375,7 +2375,7 @@ public class Editor extends JFrame implements RunnerListener {
*/
synchronized public void handleExport(final boolean usingProgrammer) {
if (Preferences.getBoolean("save.verifyUpload")) {
if (sketch.isModified()) {
if (sketch.isModified() && !sketch.isReadOnly()) {
handleSave(true);
}
}