Browse Source

Fixed bug where location wasn't getting set.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268437 13f79535-47bb-0310-9956-ffa450edef68
master
metasim 24 years ago
parent
commit
51073339a0
1 changed files with 12 additions and 11 deletions
  1. +12
    -11
      src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java

+ 12
- 11
src/antidote/org/apache/tools/ant/gui/command/SaveAsCmd.java View File

@@ -135,18 +135,19 @@ public class SaveAsCmd extends AbstractCommand {
getContext().getParentFrame(), message, title, getContext().getParentFrame(), message, title,
JOptionPane.YES_NO_OPTION); JOptionPane.YES_NO_OPTION);
// If cancelled unset file. // If cancelled unset file.
if(val == JOptionPane.YES_OPTION) {
try {
_location = new URL(
"file", null, file.getAbsolutePath());
}
catch(MalformedURLException ex) {
// Shouldn't happen. Save will just not
// happen.
ex.printStackTrace();
}
if(val != JOptionPane.YES_OPTION) {
return;
} }
} }
try {
_location = new URL(
"file", null, file.getAbsolutePath());
}
catch(MalformedURLException ex) {
// Shouldn't happen. Save will just not
// happen.
ex.printStackTrace();
}
} }
} }
@@ -162,7 +163,7 @@ public class SaveAsCmd extends AbstractCommand {
new Object[] { _location.toString() }); new Object[] { _location.toString() });
getContext().getEventBus(). getContext().getEventBus().
postEvent(new ErrorEvent(getContext(), message));
postEvent(new ErrorEvent(getContext(), message, ex));
} }
} }
} }


Loading…
Cancel
Save