JAL-4331 construct and pass on overview title before asking desktop to open the window…
authorJames Procter <j.procter@dundee.ac.uk>
Mon, 13 Nov 2023 16:05:09 +0000 (16:05 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Mon, 13 Nov 2023 16:05:09 +0000 (16:05 +0000)
src/jalview/gui/AlignFrame.java

index 0745b85..c49626b 100644 (file)
@@ -3572,8 +3572,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     final OverviewPanel overview = new OverviewPanel(alignPanel, frame,
             showHidden);
     frame.setContentPane(overview);
-    Desktop.addInternalFrame(frame, "", true, frame.getWidth(),
-            frame.getHeight(), true, true);
+
+    alignPanel.setOverviewPanel(overview);
+    alignPanel.setOverviewTitle(this);
+
+    Desktop.addInternalFrame(frame, overview.getTitle(), true,
+            frame.getWidth(), frame.getHeight(), true, true);
     frame.pack();
     frame.setLayer(JLayeredPane.PALETTE_LAYER);
     final AlignmentPanel thePanel = this.alignPanel;
@@ -3593,9 +3597,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       frame.addKeyListener(getKeyListeners()[0]);
     }
 
-    alignPanel.setOverviewPanel(overview);
-    alignPanel.setOverviewTitle(this);
-
     return overview;
   }