1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

It was impossible to save a sketch with its default name. Fixed

This commit is contained in:
Federico Fissore 2015-10-28 10:48:49 +01:00
parent 6a5ec40ca3
commit 97ed162618

View File

@ -652,7 +652,7 @@ public class Sketch {
// make sure there doesn't exist a .cpp file with that name already
// but ignore this situation for the first tab, since it's probably being
// resaved (with the same name) to another location/folder.
for (int i = 0; i < data.getCodeCount(); i++) {
for (int i = 1; i < data.getCodeCount(); i++) {
SketchCode code = data.getCode(i);
if (newName.equalsIgnoreCase(code.getPrettyName())) {
Base.showMessage(tr("Error"),