From 25bf7406cdf030f4b5d87d3e93d0fd769d956b19 Mon Sep 17 00:00:00 2001 From: "j.procter@dundee.ac.uk" Date: Fri, 18 Jul 2014 13:31:32 +0100 Subject: [PATCH] ensure the dataset is instantiated before materialising alignment viewport --- src/jalview/gui/AlignFrame.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index bf9888c..e6b7af4 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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(); } -- 1.7.10.2