JAL-1894 update year/version in copyright
[jalview.git] / src / jalview / appletgui / FontChooser.java
index ae59470..f9cdf86 100644 (file)
@@ -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.0b1)
+ * 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();
   }
 
 }