ensure the dataset is instantiated before materialising alignment viewport
authorj.procter@dundee.ac.uk <jprocter@jims-mbp-2.dyn.lifesci.dundee.ac.uk>
Fri, 18 Jul 2014 12:31:32 +0000 (13:31 +0100)
committerj.procter@dundee.ac.uk <jprocter@jims-mbp-2.dyn.lifesci.dundee.ac.uk>
Fri, 18 Jul 2014 12:31:32 +0000 (13:31 +0100)
src/jalview/gui/AlignFrame.java

index bf9888c..e6b7af4 100644 (file)
@@ -263,15 +263,17 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           int width, int height, String sequenceSetId, String viewId)
   {
     setSize(width, height);
-    viewport = new AlignViewport(al, hiddenColumns, sequenceSetId, viewId);
-
-    alignPanel = new AlignmentPanel(this, viewport);
 
     if (al.getDataset() == null)
     {
       al.setDataset(null);
     }
 
+    viewport = new AlignViewport(al, hiddenColumns, sequenceSetId, viewId);
+
+    alignPanel = new AlignmentPanel(this, viewport);
+
+
     addAlignmentPanel(alignPanel, true);
     init();
   }