JAL-1690 'scale protein as cDNA' options in Preferences, FontChooser
[jalview.git] / src / jalview / appletgui / SplitFrame.java
index 59b66c6..4fbf65a 100644 (file)
@@ -126,12 +126,13 @@ public class SplitFrame extends EmbmenuFrame
     }
 
     /*
-     * Expand protein to 3 times character width of dna
+     * Scale protein to either 1 or 3 times character width of dna
      */
     if (protein != null && cdna != null)
     {
       ViewStyleI vs = protein.getViewStyle();
-      vs.setCharWidth(3 * vs.getCharWidth());
+      int scale = vs.isScaleProteinAsCdna() ? 3 : 1;
+      vs.setCharWidth(scale * cdna.getViewStyle().getCharWidth());
       protein.setViewStyle(vs);
     }
   }
@@ -152,6 +153,8 @@ public class SplitFrame extends EmbmenuFrame
     panel.add(menuPanel, BorderLayout.NORTH);
     panel.add(af.statusBar, BorderLayout.SOUTH);
     panel.add(af.alignPanel, BorderLayout.CENTER);
+
+    af.setSplitFrame(this);
   }
 
   /**