Merge branch 'features/JAL-2608closeOverview' into develop
authorJim Procter <jprocter@issues.jalview.org>
Tue, 24 Oct 2017 16:09:42 +0000 (17:09 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 24 Oct 2017 16:09:42 +0000 (17:09 +0100)
1  2 
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/OverviewPanel.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/OverviewPanel.java

Simple merge
Simple merge
@@@ -350,11 -318,22 +352,25 @@@ public class OverviewPanel extends JPan
    {
      try
      {
-       av.getRanges().removePropertyChangeListener(this);
+       if (av != null)
+       {
+         av.getRanges().removePropertyChangeListener(this);
+       }
 +      oviewCanvas.dispose();
++
+       /*
+        * close the parent frame (which also removes it from the
+        * Desktop Windows menu)
+        */
+       ((JInternalFrame) SwingUtilities.getAncestorOfClass(
+               JInternalFrame.class, (this))).setClosed(true);
+     } catch (PropertyVetoException e)
+     {
+       // ignore
      } finally
      {
 +      progressPanel = null;
        av = null;
        oviewCanvas = null;
        ap = null;