@@ -522,16 +522,21 @@ protected boolean restoreSketches() throws Exception {
522
522
return (opened > 0 );
523
523
}
524
524
525
-
526
525
/**
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
529
527
*/
530
- protected void storeSketches () {
528
+ protected void storeScreenDimensions () {
531
529
// Save the width and height of the screen
532
530
Dimension screen = Toolkit .getDefaultToolkit ().getScreenSize ();
533
531
PreferencesData .setInteger ("last.screen.width" , screen .width );
534
532
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 () {
535
540
536
541
// If there is only one sketch opened save his position as default
537
542
if (editors .size () == 1 ) {
@@ -903,6 +908,7 @@ public boolean handleClose(Editor editor) {
903
908
}
904
909
905
910
if (editors .size () == 1 ) {
911
+ storeScreenDimensions ();
906
912
storeSketches ();
907
913
908
914
// This will store the sketch count as zero
@@ -949,6 +955,7 @@ public boolean handleClose(Editor editor) {
949
955
public boolean handleQuit () {
950
956
// If quit is canceled, this will be replaced anyway
951
957
// by a later handleQuit() that is not canceled.
958
+ storeScreenDimensions ();
952
959
storeSketches ();
953
960
try {
954
961
Editor .serialMonitor .close ();
0 commit comments