JAL-2926 fix copy group consensus (and paste sequence with space in name)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:27:57 +0000 (11:27 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:27:57 +0000 (11:27 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AnnotationLabels.java

index 73cabc4..63f2745 100644 (file)
@@ -2005,13 +2005,13 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
   {
     try
     {
-
       if (copiedSequences == null)
       {
         return;
       }
 
-      StringTokenizer st = new StringTokenizer(copiedSequences.toString());
+      StringTokenizer st = new StringTokenizer(copiedSequences.toString(),
+              "\t");
       Vector seqs = new Vector();
       while (st.hasMoreElements())
       {
index bbcb3b8..1366f31 100755 (executable)
@@ -202,7 +202,9 @@ public class AnnotationLabels extends Panel
     }
     else if (evt.getActionCommand().equals(COPYCONS_SEQ))
     {
-      SequenceI cons = av.getConsensusSeq();
+      SequenceGroup group = aa[selectedRow].groupRef;
+      SequenceI cons = group == null ? av.getConsensusSeq()
+              : group.getConsensusSeq();
       if (cons != null)
       {
         copy_annotseqtoclipboard(cons);