Skip to content

Commit

Permalink
Offer option to open sketch folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefterv committed Feb 5, 2025
1 parent 9186b8d commit 7ff0208
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -660,10 +660,18 @@ public void handleDeleteCode() {
}

if(currentIndex == 0){
JOptionPane.showMessageDialog(editor,
Language.interpolate("warn.delete.sketch_last", getName()),
Language.text("warn.delete"),
JOptionPane.ERROR_MESSAGE);
Object[] options = { Language.text("menu.sketch.show_sketch_folder"), Language.text("prompt.cancel") };
int result = JOptionPane.showOptionDialog(editor,
Language.interpolate("warn.delete.sketch_last", getName()),
Language.text("warn.delete"),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE,
null,
options,
options[1]);
if (result == JOptionPane.YES_OPTION) {
Platform.openFolder(folder);
}
return;
}

Expand Down

0 comments on commit 7ff0208

Please sign in to comment.