From: James Procter Date: Wed, 6 Sep 2023 14:28:14 +0000 (+0100) Subject: JAL-4260 attempt to rejig paging when id width is adjusted whilst in wrapped mode. X-Git-Tag: Release_2_11_4_0~188 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=930e48ff657a783ae52370e49ff4f5bb5a2a4016;p=jalview.git JAL-4260 attempt to rejig paging when id width is adjusted whilst in wrapped mode. --- diff --git a/src/jalview/gui/IdwidthAdjuster.java b/src/jalview/gui/IdwidthAdjuster.java index 4596e1f..762612e 100755 --- a/src/jalview/gui/IdwidthAdjuster.java +++ b/src/jalview/gui/IdwidthAdjuster.java @@ -158,10 +158,21 @@ public class IdwidthAdjuster extends JPanel { return; } + + // TODO JAL-4260 - work out how to trigger recomputation of wrapped pages ! + int curCol = viewport.getRanges().getStartRes() + + viewport.getRanges().getViewportWidth(); + viewport.setIdWidth(newWidth); + ap.validateAnnotationDimensions(false); + if (viewport.getWrapAlignment()) + { + viewport.getRanges().scrollToWrappedVisible( + curCol - viewport.getRanges().getViewportWidth()); + } ap.paintAlignment(true, false); - + ap.getIdPanel().getIdCanvas().setManuallyAdjusted(true); }