Dbref fetcher takes sequences, not alignment
authoramwaterhouse <Andrew Waterhouse>
Mon, 23 Apr 2007 12:30:25 +0000 (12:30 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 23 Apr 2007 12:30:25 +0000 (12:30 +0000)
src/jalview/gui/AlignFrame.java

index e649089..61e2af4 100755 (executable)
@@ -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);
       }
-      
+
     });
   }