Merge branch 'bug/JAL-2924nullTooltip' into releases/Release_2_10_4_Branch
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:30:09 +0000 (11:30 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:30:09 +0000 (11:30 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AnnotationLabels.java
src/jalview/bin/Cache.java
src/jalview/datamodel/SequenceGroup.java
src/jalview/gui/AlignmentPanel.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);
index dcd6546..fcc4f6d 100755 (executable)
@@ -178,7 +178,7 @@ import org.apache.log4j.SimpleLayout;
  * <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
index 6b797d7..944f263 100755 (executable)
@@ -1189,9 +1189,10 @@ public class SequenceGroup implements AnnotatedCollectionI
     {
       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
         {
index f5634d2..55fd185 100644 (file)
@@ -1274,7 +1274,7 @@ public class AlignmentPanel extends GAlignmentPanel implements
     }
     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);