Skip to content

Commit dec20f4

Browse files
committed
1 parent e385142 commit dec20f4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/src/processing/app/Sketch.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ protected void sortCode() {
270270
SketchCode temp = code[who];
271271
code[who] = code[i];
272272
code[i] = temp;
273+
274+
// We also need to update the current tab
275+
if (currentIndex == i) {
276+
currentIndex = who;
277+
} else if (currentIndex == who) {
278+
currentIndex = i;
279+
}
273280
}
274281
}
275282
}

0 commit comments

Comments
 (0)