Skip to content

Commit 40b6e9f

Browse files
committed
Merge branch 'master' of github.com:processing/processing
2 parents cfe5d1b + 2fc0a2e commit 40b6e9f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

app/src/processing/app/Sketch.java

Lines changed: 8 additions & 1 deletion
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
}
@@ -678,7 +685,7 @@ public void handleDeleteCode() {
678685
setCurrentCode(0);
679686

680687
// update the tabs
681-
editor.repaintHeader();
688+
editor.rebuildHeader();
682689
}
683690
}
684691
}

0 commit comments

Comments
 (0)