Bamboo test #3 The problem is not threading. It is feedback from
authorBobHanson <hansonr@stolaf.edu>
Wed, 10 Jun 2020 18:18:43 +0000 (13:18 -0500)
committerBobHanson <hansonr@stolaf.edu>
Wed, 10 Jun 2020 18:18:43 +0000 (13:18 -0500)
ViewportRanges to AlignmentPanel from trying to set the ranges to
invalid values.

src/jalview/gui/AlignmentPanel.java
src/jalview/viewmodel/ViewportRanges.java

index cb2b3ed..d84047c 100644 (file)
@@ -657,6 +657,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
    */
   public void setScrollValues(int xpos, int ypos)
   {
+    
+    System.out.println("AlignmentPanel.setScrollValues " + xpos + "_" + ypos);
     int x = xpos;
     int y = ypos;
 
@@ -677,6 +679,10 @@ public class AlignmentPanel extends GAlignmentPanel implements
       hextent = getSeqPanel().seqCanvas.getWidth() / av.getCharWidth();
       vextent = getSeqPanel().seqCanvas.getHeight() / av.getCharHeight();
 
+      System.out.println("AlignmentPanel.setScrollValues  found hext=" + hextent + " vext=" +  vextent + " width=" + width + " height=" + height 
+              );
+      
       if (hextent > width)
       {
         hextent = width;
@@ -687,6 +693,8 @@ public class AlignmentPanel extends GAlignmentPanel implements
         vextent = height;
       }
 
+      
+      
       if ((hextent + x) > width)
       {
         x = width - hextent;
@@ -697,6 +705,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
         y = height - vextent;
       }
 
+
+      System.out.println("AlignmentPanel.setScrollValues resetting these to " + x + "_" + y 
+              + " based on hext=" + hextent + " vext=" +  vextent + " width=" + width + " height=" + height 
+              );
+      
       if (y < 0)
       {
         y = 0;
index 7833778..8c137b8 100644 (file)
@@ -263,7 +263,7 @@ public class ViewportRanges extends ViewportProperties
   {
 
     if (end == 3 && this.endSeq == 14 || end == 13 && this.endSeq == 3) {
-      new NullPointerException().printStackTrace();
+      new NullPointerException().printStackTrace(System.out);
       System.out.println("ViewportRange updateStartEndSeq " + start + " " + end + " " + Thread.currentThread());
     }
     int oldstartseq = this.startSeq;