From f6e7fcbaf5b1310e93857a1f437cd986a4c02c25 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 23 Apr 2007 12:30:25 +0000 Subject: [PATCH] Dbref fetcher takes sequences, not alignment --- src/jalview/gui/AlignFrame.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index e649089..61e2af4 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1310,7 +1310,7 @@ public class AlignFrame return; } // TODO: preserve the ordering of displayed alignment annotation in any internal paste (particularly sequence associated annotation) - SequenceI [] seqs = viewport.getSelectionAsNewSequence(); + SequenceI [] seqs = viewport.getSelectionAsNewSequence(); String[] omitHidden = null; if (viewport.hasHiddenColumns) @@ -1477,7 +1477,7 @@ public class AlignFrame if (newAlignment) { - + if (Desktop.jalviewClipboard != null) { // dataset is inherited @@ -1503,10 +1503,10 @@ public class AlignFrame // an existing alignment Vector newDs = (importDs) ? new Vector() : null; // used to create // minimum dataset set - + for (int i = 0; i < sequences.length; i++) { - if (importDs) + if (importDs) { newDs.addElement(null); } @@ -1516,7 +1516,7 @@ public class AlignFrame { if (!newDs.contains(ds)) { - newDs.setElementAt(ds, i); + newDs.setElementAt(ds, i); ds = new Sequence(ds); // update with new dataset sequence sequences[i].setDatasetSequence(ds); @@ -1581,7 +1581,7 @@ public class AlignFrame alignment.setAnnotationIndex(sequences[i].getAnnotation()[a], a); } - + } } if (!newAlignment) { @@ -1610,7 +1610,7 @@ public class AlignFrame //>>>This is a fix for the moment, until a better solution is found!!<<< af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().transferSettings( alignPanel.seqPanel.seqCanvas.getFeatureRenderer()); - + // TODO: maintain provenance of an alignment, rather than just make the title a concatenation of operations. if (!externalPaste) { if (title.startsWith("Copied sequences")) @@ -3347,9 +3347,10 @@ public class AlignFrame public void actionPerformed(ActionEvent e) { new jalview.io.DBRefFetcher( - alignPanel.av.getAlignment(), alignPanel.alignFrame).fetchDBRefs(false); + alignPanel.av.alignment.getSequencesArray(), + alignPanel.alignFrame).fetchDBRefs(false); } - + }); } -- 1.7.10.2