r696 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions
Author: kmorin Date: 2014-11-20 06:37:20 +0000 (Thu, 20 Nov 2014) New Revision: 696 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/696 Log: fixes #6137 L'application se bloque quand on veut ajouter une PJ qui n'existe pas Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AddAttachmentAction.java Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AddAttachmentAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AddAttachmentAction.java 2014-11-20 06:31:05 UTC (rev 695) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AddAttachmentAction.java 2014-11-20 06:37:20 UTC (rev 696) @@ -51,12 +51,15 @@ public boolean prepareAction() throws Exception { boolean result = super.prepareAction(); - File file = getUI().getFile().getSelectedFile(); - if (file != null && !file.exists()) { - getContext().getErrorHelper().showErrorDialog(t("faxtomail.action.attachment.add.fileDoesNotExist", - file.getPath())); + if (result) { + File file = getUI().getFile().getSelectedFile(); + if (file != null && !file.exists()) { + getContext().getErrorHelper().showErrorDialog(t("faxtomail.action.attachment.add.fileDoesNotExist", + file.getPath())); + } + result = file != null && file.exists(); } - result = file != null && file.exists(); + return result; }
participants (1)
-
kmorin@users.forge.codelutin.com