From 401715f8745eeee967df8d60549b4c5d7f64530f Mon Sep 17 00:00:00 2001 From: BobHanson Date: Wed, 10 Jun 2020 12:05:25 -0500 Subject: [PATCH] So close! Bamboo test --- src/jalview/viewmodel/ViewportRanges.java | 3 ++- test/jalview/gui/SeqCanvasTest.java | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 5a4fc57..f89776e 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -236,7 +236,7 @@ public class ViewportRanges extends ViewportProperties */ public void setStartEndSeq(int start, int end) { - // System.out.println("ViewportRange setStartEndSeq " + start + " " + end); + System.out.println("ViewportRange setStartEndSeq " + start + " " + end); int[] oldvalues = updateStartEndSeq(start, end); int oldstartseq = oldvalues[0]; int oldendseq = oldvalues[1]; @@ -262,6 +262,7 @@ public class ViewportRanges extends ViewportProperties */ private int[] updateStartEndSeq(int start, int end) { + System.out.println("ViewportRange updateStartEndSeq " + start + " " + end); int oldstartseq = this.startSeq; int visibleHeight = getVisibleAlignmentHeight(); if (start > visibleHeight - 1) diff --git a/test/jalview/gui/SeqCanvasTest.java b/test/jalview/gui/SeqCanvasTest.java index 0e14a6b..a5c8aaa 100644 --- a/test/jalview/gui/SeqCanvasTest.java +++ b/test/jalview/gui/SeqCanvasTest.java @@ -335,28 +335,25 @@ public class SeqCanvasTest assertEquals(al.getHeight(), 15); ViewportRanges ranges = av.getRanges(); + System.out.println(av.getRanges() + " just before setting end to 3"); ranges.setStartEndSeq(0, 3); - System.out.println(ranges); + System.out.println(av.getRanges() + " just after setting end to 3"); av.setShowAnnotation(false); av.setScaleAboveWrapped(true); - System.out.println(ranges); SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas; av.setWrapAlignment(true); - System.out.println(ranges); av.setFont(new Font("SansSerif", Font.PLAIN, 14), true); int charHeight = av.getCharHeight(); int charWidth = av.getCharWidth(); - System.out.println(ranges); // Windows h=19, w=11. assertEquals(charHeight, !Platform.isWin() ? 17 : 19); assertEquals(charWidth, !Platform.isWin() ? 12 : 11); - System.out.println(ranges); int canvasWidth = 400; int canvasHeight = 300; testee.calculateWrappedGeometry(canvasWidth, canvasHeight); - System.out.println(ranges); + System.out.println(ranges + " just before assert"); assertEquals(ranges.getEndSeq(), 3); // unchanged int repeatingHeight = (int) PA.getValue(testee, "wrappedRepeatHeightPx"); -- 1.7.10.2