@@ -558,7 +558,7 @@ protected boolean restoreSketches() throws Exception {
558
558
location = nextEditorLocation ();
559
559
}
560
560
// If file did not exist, null will be returned for the Editor
561
- if (handleOpen (new File (path ), location , true , false , false ) != null ) {
561
+ if (handleOpen (new File (path ), location , nextEditorLocation (), true , false , false ) != null ) {
562
562
opened ++;
563
563
}
564
564
}
@@ -890,10 +890,10 @@ public Editor handleOpen(File file, boolean untitled) throws Exception {
890
890
}
891
891
892
892
protected Editor handleOpen (File file , int [] location , boolean showEditor , boolean untitled ) throws Exception {
893
- return handleOpen (file , location , showEditor , true , untitled );
893
+ return handleOpen (file , location , location , showEditor , true , untitled );
894
894
}
895
895
896
- protected Editor handleOpen (File file , int [] location , boolean showEditor , boolean storeOpenedSketches , boolean untitled ) throws Exception {
896
+ protected Editor handleOpen (File file , int [] storedLocation , int [] defaultLocation , boolean showEditor , boolean storeOpenedSketches , boolean untitled ) throws Exception {
897
897
if (!file .exists ()) return null ;
898
898
899
899
// Cycle through open windows to make sure that it's not already open.
@@ -905,7 +905,7 @@ protected Editor handleOpen(File file, int[] location, boolean showEditor, boole
905
905
}
906
906
}
907
907
908
- final Editor editor = new Editor (this , file , location , BaseNoGui .getPlatform ());
908
+ Editor editor = new Editor (this , file , storedLocation , defaultLocation , BaseNoGui .getPlatform ());
909
909
910
910
// Make sure that the sketch actually loaded
911
911
if (editor .getSketch () == null ) {
0 commit comments