JAL-2491 Tidies to Overview panel calls in light of new code
[jalview.git] / src / jalview / appletgui / AlignmentPanel.java
index c3458f9..308a550 100644 (file)
@@ -745,6 +745,9 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
   @Override
   public void adjustmentValueChanged(AdjustmentEvent evt)
   {
+    // Note that this event is NOT fired by the AWT scrollbar when setValues is
+    // called. Instead manually call adjustHorizontal and adjustVertical
+    // directly.
     if (evt == null || evt.getSource() == apvscroll)
     {
       annotationPanel.setScrollOffset(apvscroll.getValue(), false);
@@ -896,8 +899,6 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
      * Scroll to position but centring the target residue. Also set a state flag
      * to prevent adjustmentValueChanged performing this recursively.
      */
-    // setFollowingComplementScroll(true);
-    // this should be scrollToPosition(sr,verticalOffset,
     scrollToPosition(sr, seqOffset, true, true);
   }