diff options
author | Xavier Ducrohet <xav@android.com> | 2012-06-13 16:44:34 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-06-13 16:44:35 -0700 |
commit | bdf93e9fe3ae8317e721d775e948b5c09ebc2f36 (patch) | |
tree | d109ba9ade88fcdcc81fe516e82c9aac01607851 /draw9patch | |
parent | d5b3568122729e90605b2ecca5fd35b4c3b416a7 (diff) | |
parent | c7c00f4fb757c0559218fd87eb1dda95acf8a1a3 (diff) | |
download | sdk-bdf93e9fe3ae8317e721d775e948b5c09ebc2f36.zip sdk-bdf93e9fe3ae8317e721d775e948b5c09ebc2f36.tar.gz sdk-bdf93e9fe3ae8317e721d775e948b5c09ebc2f36.tar.bz2 |
Merge "Using the same directory as loaded png file path."
Diffstat (limited to 'draw9patch')
-rw-r--r-- | draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java b/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java index 9b086f4..bf3754b 100644 --- a/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java +++ b/draw9patch/src/com/android/draw9patch/ui/ImageEditorPanel.java @@ -358,7 +358,8 @@ class ImageEditorPanel extends JPanel { if (is9Patch) { return new File(name); } else { - JFileChooser chooser = new JFileChooser(); + JFileChooser chooser = new JFileChooser( + name.substring(0, name.lastIndexOf(File.separatorChar))); chooser.setFileFilter(new PngFileFilter()); int choice = chooser.showSaveDialog(this); if (choice == JFileChooser.APPROVE_OPTION) { |