File tree 1 file changed +2
-27
lines changed
1 file changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -925,45 +925,20 @@ public void actionPerformed(ActionEvent actionEvent) {
925
925
*/
926
926
public boolean handleClose (Editor editor ) {
927
927
// Check if modified
928
- // boolean immediate = editors.size() == 1;
929
928
if (!editor .checkModified ()) {
930
929
return false ;
931
930
}
932
931
933
932
if (editors .size () == 1 ) {
934
- storeScreenDimensions ();
935
- storeSketches ();
936
-
937
- // This will store the sketch count as zero
938
- editors .remove (editor );
939
- try {
940
- Editor .serialMonitor .close ();
941
- } catch (Exception e ) {
942
- //ignore
943
- }
944
- rebuildRecentSketchesMenuItems ();
945
-
946
- // Save out the current prefs state
947
- PreferencesData .save ();
948
933
949
- // Since this wasn't an actual Quit event, call System.exit()
950
- System .exit (0 );
934
+ handleQuit ();
951
935
952
936
} else {
953
937
// More than one editor window open,
954
938
// proceed with closing the current window.
955
939
editor .setVisible (false );
956
940
editor .dispose ();
957
- // for (int i = 0; i < editorCount; i++) {
958
- // if (editor == editors[i]) {
959
- // for (int j = i; j < editorCount-1; j++) {
960
- // editors[j] = editors[j+1];
961
- // }
962
- // editorCount--;
963
- // // Set to null so that garbage collection occurs
964
- // editors[editorCount] = null;
965
- // }
966
- // }
941
+
967
942
editors .remove (editor );
968
943
}
969
944
return true ;
You can’t perform that action at this time.
0 commit comments