From 930e48ff657a783ae52370e49ff4f5bb5a2a4016 Mon Sep 17 00:00:00 2001 From: James Procter Date: Wed, 6 Sep 2023 15:28:14 +0100 Subject: [PATCH] JAL-4260 attempt to rejig paging when id width is adjusted whilst in wrapped mode. --- src/jalview/gui/IdwidthAdjuster.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); } -- 1.7.10.2