{
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())
{
}
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);
* <li>FIGURE_AUTOIDWIDTH (false) Expand the left hand column of an exported
* alignment figure to accommodate even the longest sequence ID or annotation
* label.</li>
- * <li>FIGURE_FIXEDIDWIDTH Specifies the width to use for the left-hand column
+ * <li>FIGURE_USERIDWIDTH Specifies the width to use for the left-hand column
* when exporting an alignment as a figure (setting FIGURE_AUTOIDWIDTH to true
* will override this).</li>
* <li>STRUCT_FROM_PDB (false) derive secondary structure annotation from PDB
{
if (consensus.annotations[i] != null)
{
- if (consensus.annotations[i].description.charAt(0) == '[')
+ String desc = consensus.annotations[i].description;
+ if (desc.length() > 1 && desc.charAt(0) == '[')
{
- seqs.append(consensus.annotations[i].description.charAt(1));
+ seqs.append(desc.charAt(1));
}
else
{
}
Integer idwidth = null;
if (onscreen || (idwidth = Cache
- .getIntegerProperty("FIGURE_FIXEDIDWIDTH")) == null)
+ .getIntegerProperty("FIGURE_USERIDWIDTH")) == null)
{
int w = getIdPanel().getWidth();
return (w > 0 ? w : calculateIdWidth().width + 4);