File tree 2 files changed +2
-31
lines changed
2 files changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -910,35 +910,6 @@ public boolean handleClose(Editor editor) {
910
910
editor .internalCloseRunner ();
911
911
912
912
if (editors .size () == 1 ) {
913
- // For 0158, when closing the last window /and/ it was already an
914
- // untitled sketch, just give up and let the user quit.
915
- // if (Preferences.getBoolean("sketchbook.closing_last_window_quits") ||
916
- // (editor.untitled && !editor.getSketch().isModified())) {
917
- if (OSUtils .isMacOS ()) {
918
- Object [] options = {"OK" , "Cancel" };
919
- String prompt =
920
- _ ("<html> " +
921
- "<head> <style type=\" text/css\" >" +
922
- "b { font: 13pt \" Lucida Grande\" }" +
923
- "p { font: 11pt \" Lucida Grande\" ; margin-top: 8px }" +
924
- "</style> </head>" +
925
- "<b>Are you sure you want to Quit?</b>" +
926
- "<p>Closing the last open sketch will quit Arduino." );
927
-
928
- int result = JOptionPane .showOptionDialog (editor ,
929
- prompt ,
930
- _ ("Quit" ),
931
- JOptionPane .YES_NO_OPTION ,
932
- JOptionPane .QUESTION_MESSAGE ,
933
- null ,
934
- options ,
935
- options [0 ]);
936
- if (result == JOptionPane .NO_OPTION ||
937
- result == JOptionPane .CLOSED_OPTION ) {
938
- return false ;
939
- }
940
- }
941
-
942
913
// This will store the sketch count as zero
943
914
editors .remove (editor );
944
915
try {
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ public void openFiles(final AppEvent.OpenFilesEvent openFilesEvent) {
83
83
@ Override
84
84
public void handleQuitRequestWith (AppEvent .QuitEvent quitEvent , QuitResponse quitResponse ) {
85
85
if (waitForBase ()) {
86
- if (Base .INSTANCE .handleClose ( Base . INSTANCE . getActiveEditor () )) {
86
+ if (Base .INSTANCE .handleQuit ( )) {
87
87
quitResponse .performQuit ();
88
88
} else {
89
89
quitResponse .cancelQuit ();
@@ -113,4 +113,4 @@ private static void sleep(int millis) {
113
113
}
114
114
}
115
115
116
- }
116
+ }
You can’t perform that action at this time.
0 commit comments