From: amwaterhouse Date: Thu, 22 Sep 2005 13:23:38 +0000 (+0000) Subject: If Mac user hasnt selected file format, give warning X-Git-Tag: Release_2_06~24 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8a14b50da9028657ba8597b45f14b1a844c017ba;p=jalview.git If Mac user hasnt selected file format, give warning --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 4d0e1b2..a020116 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -238,7 +238,18 @@ public class AlignFrame if (value == JalviewFileChooser.APPROVE_OPTION) { - currentFileFormat = chooser.getSelectedFormat(); + currentFileFormat = chooser.getSelectedFormat(); + + if (currentFileFormat == null) + { + JOptionPane.showInternalMessageDialog(Desktop.desktop, + "You must select a file format before saving!", + "File format not specified", + JOptionPane.WARNING_MESSAGE); + value = chooser.showSaveDialog(this); + return; + } + jalview.bin.Cache.setProperty("DEFAULT_FILE_FORMAT", currentFileFormat); @@ -1285,14 +1296,6 @@ public class AlignFrame */ public void annotationPanelMenuItem_actionPerformed(ActionEvent e) { - if (annotationPanelMenuItem.isSelected() && - viewport.getWrapAlignment()) - { - annotationPanelMenuItem.setSelected(false); - - return; - } - viewport.setShowAnnotation(annotationPanelMenuItem.isSelected()); alignPanel.setAnnotationVisible(annotationPanelMenuItem.isSelected()); }