From 6a8d4183e249a9db0f46a1da7ab795c4454d219a Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 2 Aug 2007 10:16:46 +0000 Subject: [PATCH] javadoc and bugfix for 'save' when jalview is default format --- src/jalview/gui/AlignFrame.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 6302efb..f678915 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -59,9 +59,13 @@ public class AlignFrame Vector alignPanels = new Vector(); - /** DOCUMENT ME!! */ + /** + * Last format used to load or save alignments in this window + */ String currentFileFormat = null; - + /** + * Current filename for this alignment + */ String fileName = null; @@ -725,8 +729,11 @@ public class AlignFrame currentFileFormat); jalview.bin.Cache.setProperty("LAST_DIRECTORY", fileName); - - saveAlignment(fileName, currentFileFormat.substring(0,currentFileFormat.indexOf(" "))); + if (currentFileFormat.indexOf(" ")>-1) + { + currentFileFormat = currentFileFormat.substring(0, currentFileFormat.indexOf(" ")); + } + saveAlignment(fileName, currentFileFormat); } } -- 1.7.10.2