Skip to content

Commit fb8d4c3

Browse files
Remove Base.handle*Replace()
These methods dealt with opening up a sketch inside an existing editor window, but they were unused - all sketches open in a new window now.
1 parent 041a157 commit fb8d4c3

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

app/src/processing/app/Base.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -760,46 +760,6 @@ public void handleNew() throws Exception {
760760
}
761761

762762

763-
/**
764-
* Replace the sketch in the current window with a new untitled document.
765-
*/
766-
public void handleNewReplace() {
767-
if (!activeEditor.checkModified()) {
768-
return; // sketch was modified, and user canceled
769-
}
770-
771-
// Actually replace things
772-
handleNewReplaceImpl();
773-
}
774-
775-
776-
protected void handleNewReplaceImpl() {
777-
try {
778-
File file = createNewUntitled();
779-
if (file != null) {
780-
activeEditor.handleOpenInternal(file);
781-
activeEditor.untitled = true;
782-
}
783-
784-
} catch (IOException e) {
785-
activeEditor.statusError(e);
786-
}
787-
}
788-
789-
790-
public void handleOpenReplace(File file) {
791-
if (!activeEditor.checkModified()) {
792-
return; // sketch was modified, and user canceled
793-
}
794-
795-
boolean loaded = activeEditor.handleOpenInternal(file);
796-
if (!loaded) {
797-
// replace the document without checking if that's ok
798-
handleNewReplaceImpl();
799-
}
800-
}
801-
802-
803763
/**
804764
* Prompt for a sketch to open, and open it in a new window.
805765
*

0 commit comments

Comments
 (0)