From: Jim Procter Date: Fri, 12 May 2017 14:41:45 +0000 (+0100) Subject: JAL-2435 mirror antiAlias setting between cDNA and Protein X-Git-Tag: Release_2_10_2~3^2~91^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=70c343366c5918b9f9884de7da9b3105ae82edcc;p=jalview.git JAL-2435 mirror antiAlias setting between cDNA and Protein --- diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index ec4ab49..06f29e9 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -75,6 +75,10 @@ public class FontChooser extends GFontChooser private boolean lastSelMono = false; + private boolean oldSmoothFont; + + private boolean oldComplementSmooth; + /** * Creates a new FontChooser for a tree panel * @@ -100,7 +104,7 @@ public class FontChooser extends GFontChooser oldFont = alignPanel.av.getFont(); oldProteinScale = alignPanel.av.isScaleProteinAsCdna(); oldMirrorFont = alignPanel.av.isProteinFontAsCdna(); - + oldSmoothFont = alignPanel.av.antiAlias; this.ap = alignPanel; init(); } @@ -122,6 +126,7 @@ public class FontChooser extends GFontChooser { oldComplementFont = ((AlignViewport) ap.av.getCodingComplement()) .getFont(); + oldComplementSmooth = ((AlignViewport) ap.av.getCodingComplement()).antiAlias; scaleAsCdna.setVisible(true); scaleAsCdna.setSelected(ap.av.isScaleProteinAsCdna()); fontAsCdna.setVisible(true); @@ -178,6 +183,14 @@ public class FontChooser extends GFontChooser ap.av.antiAlias = smoothFont.isSelected(); ap.getAnnotationPanel().image = null; ap.paintAlignment(true); + if (ap.av.getCodingComplement() != null && ap.av.isProteinFontAsCdna()) + { + ((AlignViewport) ap.av.getCodingComplement()).antiAlias = ap.av.antiAlias; + SplitFrame sv = (SplitFrame) ap.alignFrame.getSplitViewContainer(); + sv.adjustLayout(); + sv.repaint(); + } + } /** @@ -219,12 +232,14 @@ public class FontChooser extends GFontChooser ap.av.setFont(oldFont, true); ap.av.setScaleProteinAsCdna(oldProteinScale); ap.av.setProteinFontAsCdna(oldMirrorFont); + ap.av.antiAlias = oldSmoothFont; ap.paintAlignment(true); if (scaleAsCdna.isVisible() && scaleAsCdna.isEnabled()) { ap.av.getCodingComplement().setScaleProteinAsCdna(oldProteinScale); ap.av.getCodingComplement().setProteinFontAsCdna(oldMirrorFont); + ((AlignViewport) ap.av.getCodingComplement()).antiAlias = oldComplementSmooth; ap.av.getCodingComplement().setFont(oldComplementFont, true); SplitFrame splitFrame = (SplitFrame) ap.alignFrame .getSplitViewContainer();