Skip to content

Commit c5c3a77

Browse files
matthijskooijmanfacchinm
authored andcommitted
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 7d277b3 commit c5c3a77

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
@@ -755,46 +755,6 @@ public void handleNew() throws Exception {
755755
}
756756

757757

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

0 commit comments

Comments
 (0)