From cb646bbb8d612d6bf14d1eeec6a02b91ac532c61 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 12 Feb 2015 11:04:45 +0000 Subject: [PATCH 1/1] JAL-1633 set file format on 'translate cDNA' --- src/jalview/gui/AlignFrame.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index d613ea7..dedff72 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -429,7 +429,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, public void setFileName(String file, String format) { fileName = file; - currentFileFormat = format; + setFileFormat(format); reload.setEnabled(true); } @@ -4963,6 +4963,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, else { AlignFrame af = new AlignFrame(al, DEFAULT_WIDTH, DEFAULT_HEIGHT); + af.setFileFormat(this.currentFileFormat); Desktop.addInternalFrame(af, MessageManager.formatMessage( "label.translation_of_params", new Object[] { this.getTitle() }), DEFAULT_WIDTH, DEFAULT_HEIGHT); @@ -4972,6 +4973,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } /** + * Set the file format + * + * @param fileFormat + */ + public void setFileFormat(String fileFormat) + { + this.currentFileFormat = fileFormat; + } + + /** * Try to load a features file onto the alignment. * * @param file -- 1.7.10.2