JAL-580 - display position where wuss parsing error occured
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index 5c03881..e8b2e72 100644 (file)
@@ -344,7 +344,11 @@ public class AnnotationRenderer
               }
             }
           }
-  
+          if (!row.isValidStruc())
+          {
+            g.setColor(Color.orange);
+            g.fillRect((int)row.getInvalidStrucPos()*charWidth, y, charWidth, charHeight);
+          }
           if (validCharWidth
                   && validRes
                   && row.annotations[column].displayCharacter != null
@@ -471,6 +475,15 @@ public class AnnotationRenderer
       {
         validEnd = true;
       }
+      if ((row.annotations == null) || (row.annotations.length <= column)
+              || (row.annotations[column] == null))
+      {
+        validRes = false;
+      }
+      else
+      {
+        validRes = true;
+      }
   
       // x ++;