JAL-1367 allow reference sequence to be shown in bold in ID panel
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 30 Aug 2013 11:05:36 +0000 (12:05 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 30 Aug 2013 11:05:36 +0000 (12:05 +0100)
src/jalview/appletgui/IdCanvas.java
src/jalview/gui/IdCanvas.java
src/jalview/viewmodel/AlignmentViewport.java

index a35be15..14cccc9 100755 (executable)
@@ -224,7 +224,7 @@ public class IdCanvas extends Panel
 
           SequenceI s = av.getAlignment().getSequenceAt(i);
           gg.setFont(italic);
-          if (av.hasHiddenRows())
+          if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
           {
             setHiddenFont(s);
           }
@@ -254,7 +254,7 @@ public class IdCanvas extends Panel
         }
         gg.setFont(italic);
         // boolean isrep=false;
-        if (av.hasHiddenRows())
+        if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
         {
           // isrep =
           setHiddenFont(seq);
index 5b589bb..92747a2 100755 (executable)
@@ -307,7 +307,7 @@ public class IdCanvas extends JPanel
         for (int i = starty; i < alheight; i++)
         {
           SequenceI s = av.getAlignment().getSequenceAt(i);
-          if (av.hasHiddenRows())
+          if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
           {
             setHiddenFont(s);
           }
@@ -347,7 +347,7 @@ public class IdCanvas extends JPanel
           continue;
         }
 
-        if (av.hasHiddenRows())
+        if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
         {
           setHiddenFont(sequence);
         }
index 05f69b1..2d06012 100644 (file)
@@ -984,8 +984,8 @@ public abstract class AlignmentViewport implements AlignViewportI
 
   public boolean isHiddenRepSequence(SequenceI seq)
   {
-    return hiddenRepSequences != null
-            && hiddenRepSequences.containsKey(seq);
+    return alignment.getSeqrep()==seq || (hiddenRepSequences != null
+            && hiddenRepSequences.containsKey(seq));
   }
 
   public SequenceGroup getRepresentedSequences(SequenceI seq)