mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 19:31:16 +01:00
trying to clear up the "Save As" progress frame and avoid bugs
This commit is contained in:
@@ -1730,39 +1730,6 @@ public class JavaEditor extends Editor {
|
||||
|
||||
@Override
|
||||
public boolean handleSave(boolean immediately) {
|
||||
//System.out.println("handleSave " + immediately);
|
||||
|
||||
//log("handleSave, viewing autosave? " + viewingAutosaveBackup);
|
||||
/* If user wants to save a backup, the backup sketch should get
|
||||
* copied to the main sketch directory, simply reload the main sketch.
|
||||
*/
|
||||
if(viewingAutosaveBackup){
|
||||
/*
|
||||
File files[] = autosaver.getSketchBackupFolder().listFiles();
|
||||
File src = autosaver.getSketchBackupFolder(), dst = autosaver
|
||||
.getActualSketchFolder();
|
||||
for (File f : files) {
|
||||
log("Copying " + f.getAbsolutePath() + " to " + dst.getAbsolutePath());
|
||||
try {
|
||||
if (f.isFile()) {
|
||||
f.delete();
|
||||
Base.copyFile(f, new File(dst + File.separator + f.getName()));
|
||||
} else {
|
||||
Base.removeDir(f);
|
||||
Base.copyDir(f, new File(dst + File.separator + f.getName()));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
File sk = autosaver.getActualSketchFolder();
|
||||
Base.removeDir(autosaver.getAutoSaveDir());
|
||||
//handleOpenInternal(sk.getAbsolutePath() + File.separator + sk.getName() + ".pde");
|
||||
getBase().handleOpen(sk.getAbsolutePath() + File.separator + sk.getName() + ".pde");
|
||||
//viewingAutosaveBackup = false;
|
||||
*/
|
||||
}
|
||||
|
||||
// note modified tabs
|
||||
final List<String> modified = new ArrayList<String>();
|
||||
for (int i = 0; i < getSketch().getCodeCount(); i++) {
|
||||
@@ -1795,9 +1762,6 @@ public class JavaEditor extends Editor {
|
||||
}
|
||||
|
||||
|
||||
private boolean viewingAutosaveBackup;
|
||||
|
||||
|
||||
/**
|
||||
* Set text contents of a specific tab. Updates underlying document and text
|
||||
* area. Clears Breakpoints.
|
||||
|
||||
Reference in New Issue
Block a user