fix handleSaveAs() inversion

This commit is contained in:
Ben Fry
2023-02-09 18:26:56 -05:00
parent aa58ae8b14
commit a8401d14ab
4 changed files with 8 additions and 6 deletions
-1
View File
@@ -840,7 +840,6 @@ public class Sketch {
* Also removes the previously-generated .class and .jar files,
* because they can cause trouble.
*/
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean saveAs() throws IOException {
String newParentDir = null;
String newSketchName = null;
+4 -4
View File
@@ -2171,20 +2171,20 @@ public abstract class Editor extends JFrame implements RunnerListener {
public boolean handleSaveAs() {
statusNotice(Language.text("editor.status.saving"));
try {
//noinspection StatementWithEmptyBody
if (!sketch.saveAs()) {
if (sketch.saveAs()) {
// No longer showing "Done" message except in cases where a
// progress bar is necessary. Message will come from Sketch.
//statusNotice(Language.text("editor.status.saving.done"));
return true;
} else {
statusNotice(Language.text("editor.status.saving.canceled"));
return false;
}
} catch (Exception e) {
// show the error as a message in the window
statusError(e);
}
return true;
return false;
}
@@ -659,7 +659,6 @@ public class JavaEditor extends Editor {
}
public boolean handleSaveAs() {
//System.out.println("handleSaveAs");
String oldName = getSketch().getCode(0).getFileName();
+4
View File
@@ -4,6 +4,8 @@ X https://github.com/processing/processing4/issues/608
X set all build.xml files to use Java 17
X also fix several that still had tabs instead of spaces
X update to JDK 17.0.6+10 from https://adoptium.net/
X fix inversion of handleSaveAs() introduced in:
X https://github.com/processing/processing4/commit/aef561a8eb8fa894c5a22c611279a5092e2dbb28
manager
X add 'exports' to the library parameters
@@ -21,6 +23,8 @@ _ https://github.com/processing/processing4/issues/647
_ lots of folders remaining in 'old' for Modes
_ were these shut off during debug? need to be moving these to trash (maybe only on startup)
_ opening p5jsMode sketch with no local.properties throws an NPE
design
X tool tips for errors/warnings not picking up correct colors
X also fix the margins and border