X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FFontChooser.java;h=8ada2e9fad239265435ac4560fbbd2202cfa7a14;hb=1e085f14ae2f19adfac0153c437ee891f0ad07bc;hp=ae5947039356a171baed1a719a8de27295b21713;hpb=f69e96788c2ae3a08f56c4461d8d197a3b3a06a2;p=jalview.git diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index ae59470..8ada2e9 100644 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -20,6 +20,9 @@ */ package jalview.appletgui; +import jalview.api.ViewStyleI; +import jalview.util.MessageManager; + import java.awt.BorderLayout; import java.awt.Button; import java.awt.Checkbox; @@ -37,9 +40,6 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import jalview.api.ViewStyleI; -import jalview.util.MessageManager; - /** * This dialog allows the user to try different font settings and related * options. Changes are immediately visible on the alignment or tree. The user @@ -204,6 +204,13 @@ public class FontChooser extends Panel implements ItemListener { if (ap != null) { + ap.av.setScaleProteinAsCdna(oldScaleProtein); + if (ap.av.getCodingComplement() != null) + { + ap.av.getCodingComplement().setScaleProteinAsCdna(oldScaleProtein); + ap.alignFrame.getSplitFrame().repaint(); + } + ap.av.setFont(oldFont); ViewStyleI style = ap.av.getViewStyle(); if (style.getCharWidth() != oldCharWidth) @@ -390,11 +397,10 @@ public class FontChooser extends Panel implements ItemListener optionsPanel.add(stylePanel, null); /* - * Only show 'scale protein as cDNA' in protein half of a SplitFrame + * Only show 'scale protein as cDNA' in a SplitFrame */ this.add(optionsPanel, BorderLayout.NORTH); - if (ap.alignFrame.getSplitFrame() != null - && !ap.av.getAlignment().isNucleotide()) + if (ap.alignFrame.getSplitFrame() != null) { this.add(scalePanel, BorderLayout.CENTER); } @@ -408,8 +414,11 @@ public class FontChooser extends Panel implements ItemListener protected void scaleAsCdna_actionPerformed() { ap.av.setScaleProteinAsCdna(scaleAsCdna.getState()); + ap.av.getCodingComplement().setScaleProteinAsCdna( + scaleAsCdna.getState()); ap.alignFrame.getSplitFrame().adjustLayout(); ap.paintAlignment(true); + ap.alignFrame.getSplitFrame().repaint(); } }