From: BobHanson Date: Wed, 10 Jun 2020 18:18:43 +0000 (-0500) Subject: Bamboo test #3 The problem is not threading. It is feedback from X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8f56b5317ff932c05d9a98cb43134ec69ddd1b36;p=jalview.git Bamboo test #3 The problem is not threading. It is feedback from ViewportRanges to AlignmentPanel from trying to set the ranges to invalid values. --- diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index cb2b3ed..d84047c 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -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; diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 7833778..8c137b8 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -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;