Only check for conflict with an existing C++ file when renaming the sketch, not when adding a new file.

This commit is contained in:
David A. Mellis 2010-05-16 04:09:21 +00:00
parent 3738f450c0
commit 775c4d272c
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ public class Sketch {
return;
}
if (currentIndex == 0) {
if (renamingCode && currentIndex == 0) {
for (int i = 1; i < codeCount; i++) {
if (sanitaryName.equalsIgnoreCase(code[i].getPrettyName()) &&
code[i].getExtension().equalsIgnoreCase("cpp")) {