JAL-1400 add codebase and caller allowable codebase
[jalview.git] / src / jalview / appletgui / AnnotationPanel.java
index f4b2212..154652d 100755 (executable)
@@ -253,10 +253,10 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
       }
     }
 
-    aa[activeRow].validateRangeAndDisplay();
+    av.getAlignment().validateAnnotation(aa[activeRow]);
 
-    adjustPanelHeight();
     ap.alignmentChanged();
+    adjustPanelHeight();
     repaint();
 
     return;
@@ -657,10 +657,12 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
   @Override
   public int[] getVisibleVRange()
   {
+    if (ap!=null && ap.alabels!=null)
+    {
     int sOffset=-ap.alabels.scrollOffset;
     int visHeight = sOffset+ap.annotationPanelHolder.getHeight();
     bounds[0] = sOffset; bounds[1]=visHeight;
     return bounds;
+    } else return null;
   }
-
 }