From: gmungoc Date: Thu, 6 Jul 2017 14:59:43 +0000 (+0100) Subject: JAL-147 prevent vertical Overview box movement in wrapped mode X-Git-Tag: Release_2_10_3b1~132^2~43 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=133e7bdb89fee7c8385c9991e45c8834e1910b51;p=jalview.git JAL-147 prevent vertical Overview box movement in wrapped mode --- diff --git a/src/jalview/viewmodel/OverviewDimensionsHideHidden.java b/src/jalview/viewmodel/OverviewDimensionsHideHidden.java index 4bf7694..4d64f1c 100644 --- a/src/jalview/viewmodel/OverviewDimensionsHideHidden.java +++ b/src/jalview/viewmodel/OverviewDimensionsHideHidden.java @@ -39,6 +39,11 @@ public class OverviewDimensionsHideHidden extends OverviewDimensions y = 0; } + if (ranges.isWrappedMode()) + { + y = 0; // sorry, no vertical scroll when wrapped + } + // // Convert x value to residue position // diff --git a/src/jalview/viewmodel/OverviewDimensionsShowHidden.java b/src/jalview/viewmodel/OverviewDimensionsShowHidden.java index 2216f33..62e8000 100644 --- a/src/jalview/viewmodel/OverviewDimensionsShowHidden.java +++ b/src/jalview/viewmodel/OverviewDimensionsShowHidden.java @@ -81,6 +81,11 @@ public class OverviewDimensionsShowHidden extends OverviewDimensions y = 0; } + if (ranges.isWrappedMode()) + { + y = 0; // sorry, no vertical scroll when wrapped + } + // // Convert x value to residue position // diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 36ed984..7c6b7ab 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -556,6 +556,11 @@ public class ViewportRanges extends ViewportProperties wrappedMode = wrapped; } + public boolean isWrappedMode() + { + return wrappedMode; + } + /** * Answers the vertical scroll position (0..) to set, given the visible column * that is at top left. Note that if called with the total visible width of