X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FFontChooser.java;h=443ebceafffe130b69023898846b5f54fec24c8c;hb=6200addf078b7f7ace90597dc056dafc7fc602c1;hp=96dfc208e9bd8b210858c151e85b37194a0308e6;hpb=e3f93aa087ce63e7b557497d1f4563ed4dbe2941;p=jalview.git diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index 96dfc20..443ebce 100644 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -125,8 +125,9 @@ public class FontChooser extends Panel implements ItemListener { this.ap = ap; oldFont = ap.av.getFont(); - oldCharWidth = ap.av.getViewStyle().getCharWidth(); - oldScaleProtein = ap.av.getViewStyle().isScaleProteinAsCdna(); + oldCharWidth = ap.av.getCharWidth(); + oldScaleProtein = ap.av.isScaleProteinAsCdna(); + oldMirrorFont = ap.av.isProteinFontAsCdna(); try { @@ -260,7 +261,7 @@ public class FontChooser extends Panel implements ItemListener { ap.av.setCharWidth(oldCharWidth); } - ap.paintAlignment(true); + ap.paintAlignment(true, false); } else if (tp != null) { @@ -289,11 +290,11 @@ public class FontChooser extends Panel implements ItemListener } Font newFont = new Font(fontName.getSelectedItem().toString(), - fontStyle.getSelectedIndex(), Integer.parseInt(fontSize - .getSelectedItem().toString())); + fontStyle.getSelectedIndex(), + Integer.parseInt(fontSize.getSelectedItem().toString())); FontMetrics fm = getGraphics().getFontMetrics(newFont); - double mw = fm.getStringBounds("M", getGraphics()).getWidth(), iw = fm - .getStringBounds("I", getGraphics()).getWidth(); + double mw = fm.getStringBounds("M", getGraphics()).getWidth(), + iw = fm.getStringBounds("I", getGraphics()).getWidth(); if (mw < 1 || iw < 1) { // TODO: JAL-1100 @@ -480,8 +481,8 @@ public class FontChooser extends Panel implements ItemListener protected void scaleAsCdna_actionPerformed() { ap.av.setScaleProteinAsCdna(scaleAsCdna.getState()); - ap.av.getCodingComplement().setScaleProteinAsCdna( - scaleAsCdna.getState()); + ap.av.getCodingComplement() + .setScaleProteinAsCdna(scaleAsCdna.getState()); changeFont(); }