File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -574,16 +574,19 @@ protected void storeSketches() {
574574 if (path .startsWith (untitledPath ) && !sketch .isModified ()) {
575575 continue ;
576576 }
577- PreferencesData .set ("last.sketch" + index + ".path" , path );
578-
579- int [] placement = editor .getPlacement ();
580- String location = PApplet .join (PApplet .str (placement ), "," );
581- PreferencesData .set ("last.sketch" + index + ".location" , location );
577+ storeSketchLocation (editor , "" + index );
582578 index ++;
583579 }
584580 PreferencesData .setInteger ("last.sketch.count" , index );
585581 }
586582
583+ private void storeSketchLocation (Editor editor , String index ) {
584+ String path = editor .getSketch ().getMainFilePath ();
585+ String loc = StringUtils .join (editor .getPlacement (), ',' );
586+ PreferencesData .set ("last.sketch" + index + ".path" , path );
587+ PreferencesData .set ("last.sketch" + index + ".location" , loc );
588+ }
589+
587590 protected void storeRecentSketches (Sketch sketch ) {
588591 if (sketch .isUntitled ()) {
589592 return ;
You can’t perform that action at this time.
0 commit comments