From 17617d568de6620954c0616344f532bcaa4b57cd Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 7 Mar 2018 11:27:57 +0000 Subject: [PATCH] JAL-2926 fix copy group consensus (and paste sequence with space in name) --- src/jalview/appletgui/AlignFrame.java | 4 ++-- src/jalview/appletgui/AnnotationLabels.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 73cabc4..63f2745 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -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()) { diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index bbcb3b8..1366f31 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -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); -- 1.7.10.2