update start and end res when copying
authoramwaterhouse <Andrew Waterhouse>
Fri, 11 Feb 2005 11:03:47 +0000 (11:03 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 11 Feb 2005 11:03:47 +0000 (11:03 +0000)
src/jalview/gui/AlignFrame.java

index 83f7ba0..7f8b8e9 100755 (executable)
@@ -210,7 +210,8 @@ public class AlignFrame extends GAlignFrame
        for(int i=0; i<sg.getSize(); i++)\r
        {\r
          SequenceI seq = sg.getSequenceAt(i);\r
-         buffer.append( seq.getName()+"\t"+seq.getStart() +"\t"+seq.getEnd()+"\t"\r
+         buffer.append( seq.getName()+"\t"+seq.findPosition( sg.getStartRes() ) +"\t"\r
+                        +seq.findPosition( sg.getEndRes() )+ "\t"\r
                         +sg.getSequenceAt(i).getSequence(sg.getStartRes(), sg.getEndRes()+1)+"\n");\r
        }\r
      c.setContents( new StringSelection( buffer.toString()) , null ) ;\r
@@ -244,8 +245,8 @@ public class AlignFrame extends GAlignFrame
         String name = st.nextToken();\r
         int start = Integer.parseInt(st.nextToken());\r
         int end = Integer.parseInt(st.nextToken());\r
+        Sequence sequence = new Sequence(name,st.nextToken(), start, end);\r
 \r
-        Sequence sequence = new Sequence(name, st.nextToken(), start, end);\r
         if(!newAlignment)\r
           viewport.alignment.addSequence(sequence);\r
         else\r