JAL-2600 updates following review
[jalview.git] / src / jalview / appletgui / IdCanvas.java
index 74bbcf5..5313b41 100755 (executable)
@@ -402,8 +402,12 @@ public class IdCanvas extends Panel implements ViewportListenerI
   public void propertyChange(PropertyChangeEvent evt)
   {
     // Respond to viewport range changes (e.g. alignment panel was scrolled)
-    if (evt.getPropertyName().equals("startseq")
-            || evt.getPropertyName().equals("endseq"))
+    // Both scrolling and resizing change viewport ranges: scrolling changes
+    // both start and end points, but resize only changes end values.
+    // Here we only want to fastpaint on a scroll, with resize using a normal
+    // paint, so scroll events are identified as changes to the horizontal or
+    // vertical start value.
+    if (evt.getPropertyName().equals(ViewportRanges.STARTSEQ))
     {
       fastPaint((int) evt.getNewValue() - (int) evt.getOldValue());
     }