javadoc and bugfix for 'save' when jalview is default format
authorjprocter <Jim Procter>
Thu, 2 Aug 2007 10:16:46 +0000 (10:16 +0000)
committerjprocter <Jim Procter>
Thu, 2 Aug 2007 10:16:46 +0000 (10:16 +0000)
src/jalview/gui/AlignFrame.java

index 6302efb..f678915 100755 (executable)
@@ -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);
     }
   }