JAL-1747 close all windows on Quit (+small bug fix)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 Jun 2015 14:07:41 +0000 (15:07 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 Jun 2015 14:07:41 +0000 (15:07 +0100)
src/jalview/gui/Desktop.java

index 1228965..e8d7ffd 100644 (file)
  */
 package jalview.gui;
 
-import jalview.api.AlignViewportI;
-import jalview.api.AlignmentViewPanel;
-import jalview.bin.Cache;
-import jalview.io.FileLoader;
-import jalview.io.FormatAdapter;
-import jalview.io.IdentifyFile;
-import jalview.io.JalviewFileChooser;
-import jalview.io.JalviewFileView;
-import jalview.jbgui.GSplitFrame;
-import jalview.jbgui.GStructureViewer;
-import jalview.structure.StructureSelectionManager;
-import jalview.util.ImageMaker;
-import jalview.util.MessageManager;
-import jalview.viewmodel.AlignmentViewport;
-import jalview.ws.params.ParamManager;
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -100,6 +84,22 @@ import javax.swing.event.HyperlinkEvent.EventType;
 import javax.swing.event.MenuEvent;
 import javax.swing.event.MenuListener;
 
+import jalview.api.AlignViewportI;
+import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
+import jalview.io.IdentifyFile;
+import jalview.io.JalviewFileChooser;
+import jalview.io.JalviewFileView;
+import jalview.jbgui.GSplitFrame;
+import jalview.jbgui.GStructureViewer;
+import jalview.structure.StructureSelectionManager;
+import jalview.util.ImageMaker;
+import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
+import jalview.ws.params.ParamManager;
+
 /**
  * Jalview Desktop
  * 
@@ -1166,7 +1166,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     {
       dialogExecutor.shutdownNow();
     }
-
+    closeAll_actionPerformed(null);
     System.exit(0);
   }
 
@@ -2522,7 +2522,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   public void registerHandler(final long id,
           final IProgressIndicatorHandler handler)
   {
-    if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
+    if (progressBarHandlers == null
+            || !progressBars.containsKey(new Long(id)))
     {
       throw new Error(
               MessageManager