JAL-4134 popup menu and annotation row property to control display of display of...
[jalview.git] / src / jalview / renderer / ContactMapRenderer.java
index a8f6c1b..8f38d02 100644 (file)
@@ -102,7 +102,7 @@ public abstract class ContactMapRenderer implements AnnotationRowRendererI
           HiddenColumns hiddenColumns, ColumnSelection columnSelection,
           AlignmentAnnotation _aa, Annotation[] aa_annotations, int sRes,
           int eRes, float min, float max, int y)
-  {
+  {    
     if (sRes > aa_annotations.length)
     {
       return;
@@ -114,7 +114,7 @@ public abstract class ContactMapRenderer implements AnnotationRowRendererI
     g.setColor(shade.no_data);
 
     g.drawLine(x, y2, (eRes - sRes) * charWidth, y2);
-
+    boolean showGroups = _aa.isShowGroupsForContactMatrix();
     int column;
     int aaMax = aa_annotations.length - 1;
     ContactMatrixI cm = viewport.getContactMatrix(_aa);
@@ -204,7 +204,7 @@ public abstract class ContactMapRenderer implements AnnotationRowRendererI
         {
           col = shade.hidden;
         }
-        if (gpcol != null && gpcol != Color.white)
+        if (showGroups && gpcol != null && gpcol != Color.white)
         {
           // todo - could overlay group as a transparent rectangle ?
           col = new Color(