From: gmungoc Date: Tue, 4 Jul 2017 08:12:13 +0000 (+0100) Subject: JAL-147 extract local variable for ease of debugging X-Git-Tag: Release_2_10_3b1~132^2~56 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0ad8259c1d61d8397e1722238f2295e5d4089875;p=jalview.git JAL-147 extract local variable for ease of debugging --- diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 36e598f..abbc24c 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -227,9 +227,10 @@ public class ViewportRanges extends ViewportProperties public void setStartEndSeq(int start, int end) { int oldstartseq = this.startSeq; - if (start > getVisibleAlignmentHeight() - 1) + int visibleHeight = getVisibleAlignmentHeight(); + if (start > visibleHeight - 1) { - startSeq = Math.max(getVisibleAlignmentHeight() - 1, 0); + startSeq = Math.max(visibleHeight - 1, 0); } else if (start < 0) { @@ -241,9 +242,9 @@ public class ViewportRanges extends ViewportProperties } int oldendseq = this.endSeq; - if (end >= getVisibleAlignmentHeight()) + if (end >= visibleHeight) { - endSeq = Math.max(getVisibleAlignmentHeight() - 1, 0); + endSeq = Math.max(visibleHeight - 1, 0); } else if (end < 0) {