Merge pull request #3540 from aengelke/patch-1

Fix bug with tab sorting when adding new tabs
This commit is contained in:
Ben Fry
2015-08-06 11:02:02 -04:00

View File

@@ -270,6 +270,13 @@ public class Sketch {
SketchCode temp = code[who];
code[who] = code[i];
code[i] = temp;
// We also need to update the current tab
if (currentIndex == i) {
currentIndex = who;
} else if (currentIndex == who) {
currentIndex = i;
}
}
}
}