@@ -522,16 +522,21 @@ protected boolean restoreSketches() throws Exception {
522522 return (opened > 0 );
523523 }
524524
525-
526525 /**
527- * Store list of sketches that are currently open.
528- * Called when the application is quitting and documents are still open.
526+ * Store screen dimensions on last close
529527 */
530- protected void storeSketches () {
528+ protected void storeScreenDimensions () {
531529 // Save the width and height of the screen
532530 Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
533531 PreferencesData .setInteger ("last.screen.width" , screen .width );
534532 PreferencesData .setInteger ("last.screen.height" , screen .height );
533+ }
534+
535+ /**
536+ * Store list of sketches that are currently open.
537+ * Called when the application is quitting and documents are still open.
538+ */
539+ protected void storeSketches () {
535540
536541 // If there is only one sketch opened save his position as default
537542 if (editors .size () == 1 ) {
@@ -903,6 +908,7 @@ public boolean handleClose(Editor editor) {
903908 }
904909
905910 if (editors .size () == 1 ) {
911+ storeScreenDimensions ();
906912 storeSketches ();
907913
908914 // This will store the sketch count as zero
@@ -949,6 +955,7 @@ public boolean handleClose(Editor editor) {
949955 public boolean handleQuit () {
950956 // If quit is canceled, this will be replaced anyway
951957 // by a later handleQuit() that is not canceled.
958+ storeScreenDimensions ();
952959 storeSketches ();
953960 try {
954961 Editor .serialMonitor .close ();
0 commit comments