From: Jim Procter Date: Thu, 9 Jun 2022 07:18:31 +0000 (+0100) Subject: JAL-4026 update the viewport’s wrapped width after calculating it X-Git-Tag: Release_2_11_2_6~58 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=99bfb1a08e5ceb3a3c990bb49dcd7433a0880558;p=jalview.git JAL-4026 update the viewport’s wrapped width after calculating it --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index ac7cf10..d15cdcf 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -20,18 +20,6 @@ */ package jalview.gui; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.HiddenColumns; -import jalview.datamodel.SearchResultsI; -import jalview.datamodel.SequenceGroup; -import jalview.datamodel.SequenceI; -import jalview.datamodel.VisibleContigsIterator; -import jalview.renderer.ScaleRenderer; -import jalview.renderer.ScaleRenderer.ScaleMark; -import jalview.util.Comparison; -import jalview.viewmodel.ViewportListenerI; -import jalview.viewmodel.ViewportRanges; - import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; @@ -47,6 +35,18 @@ import java.util.List; import javax.swing.JPanel; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.HiddenColumns; +import jalview.datamodel.SearchResultsI; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; +import jalview.datamodel.VisibleContigsIterator; +import jalview.renderer.ScaleRenderer; +import jalview.renderer.ScaleRenderer.ScaleMark; +import jalview.util.Comparison; +import jalview.viewmodel.ViewportListenerI; +import jalview.viewmodel.ViewportRanges; + /** * The Swing component on which the alignment sequences, and annotations (if * shown), are drawn. This includes scales above, left and right (if shown) in @@ -690,7 +690,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * compute width in residues; this also sets East and West label widths */ int wrappedWidthInResidues = getWrappedCanvasWidth(canvasWidth); - + av.setWrappedWidth(wrappedWidthInResidues); // update model accordingly /* * limit visibleWidths to not exceed width of alignment */