If Mac user hasnt selected file format, give warning
authoramwaterhouse <Andrew Waterhouse>
Thu, 22 Sep 2005 13:23:38 +0000 (13:23 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 22 Sep 2005 13:23:38 +0000 (13:23 +0000)
src/jalview/gui/AlignFrame.java

index 4d0e1b2..a020116 100755 (executable)
@@ -238,7 +238,18 @@ public class AlignFrame
 \r
     if (value == JalviewFileChooser.APPROVE_OPTION)\r
     {\r
-      currentFileFormat = chooser.getSelectedFormat();\r
+        currentFileFormat = chooser.getSelectedFormat();\r
+\r
+        if (currentFileFormat == null)\r
+        {\r
+          JOptionPane.showInternalMessageDialog(Desktop.desktop,\r
+                                                "You must select a file format before saving!",\r
+                                                "File format not specified",\r
+                                                JOptionPane.WARNING_MESSAGE);\r
+          value = chooser.showSaveDialog(this);\r
+          return;\r
+        }\r
+\r
       jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT",\r
                                     currentFileFormat);\r
 \r
@@ -1285,14 +1296,6 @@ public class AlignFrame
    */\r
   public void annotationPanelMenuItem_actionPerformed(ActionEvent e)\r
   {\r
-    if (annotationPanelMenuItem.isSelected() &&\r
-        viewport.getWrapAlignment())\r
-    {\r
-      annotationPanelMenuItem.setSelected(false);\r
-\r
-      return;\r
-    }\r
-\r
     viewport.setShowAnnotation(annotationPanelMenuItem.isSelected());\r
     alignPanel.setAnnotationVisible(annotationPanelMenuItem.isSelected());\r
   }\r