Skip to content

Commit 24642c4

Browse files
committed
Merge pull request #3366 from Chris--A/more-than-27-sketches
Increase maximum number of spawned instances.
2 parents a1e5271 + 505ff17 commit 24642c4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Diff for: app/src/processing/app/Base.java

+12-3
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,10 @@ protected File createNewUntitled() throws IOException {
723723
int day = cal.get(Calendar.DAY_OF_MONTH); // 1..31
724724
int month = cal.get(Calendar.MONTH); // 0..11
725725
String purty = months[month] + PApplet.nf(day, 2);
726+
726727
do {
727-
if (index == 26) {
728-
// In 0159, avoid running past z by sending people outdoors.
728+
if (index == 26*26) {
729+
// In 0166, avoid running past zz by sending people outdoors.
729730
if (!breakTime) {
730731
showWarning(_("Time for a Break"),
731732
_("You've reached the limit for auto naming of new sketches\n" +
@@ -737,7 +738,15 @@ protected File createNewUntitled() throws IOException {
737738
}
738739
return null;
739740
}
740-
newbieName = "sketch_" + purty + ((char) ('a' + index));
741+
742+
int multiples = index / 26;
743+
744+
if(multiples > 0){
745+
newbieName = ((char) ('a' + (multiples-1))) + "" + ((char) ('a' + (index % 26))) + "";
746+
}else{
747+
newbieName = ((char) ('a' + index)) + "";
748+
}
749+
newbieName = "sketch_" + purty + newbieName;
741750
newbieDir = new File(newbieParentDir, newbieName);
742751
index++;
743752
// Make sure it's not in the temp folder *and* it's not in the sketchbook

0 commit comments

Comments
 (0)