Skip to content

Commit 4e84238

Browse files
committed
Restore "Delete" tab functionality
The file was being deleted but the tab was still there
1 parent 12eb09f commit 4e84238

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/src/processing/app/Editor.java

+5
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,11 @@ protected void addTab(SketchFile file, String contents) throws IOException {
17061706
tabs.add(tab);
17071707
}
17081708

1709+
protected void removeTab(SketchFile file) throws IOException {
1710+
int index = findTabIndex(file);
1711+
tabs.remove(index);
1712+
}
1713+
17091714
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17101715

17111716
void handleFindReference(ActionEvent e) {

app/src/processing/app/SketchController.java

+2
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ public void handleDeleteCode() throws IOException {
260260
return;
261261
}
262262

263+
editor.removeTab(current);
264+
263265
// just set current tab to the main tab
264266
editor.selectTab(0);
265267

0 commit comments

Comments
 (0)