mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
[Desktop] Clicking cancel in a save dialog (e.g. dump state) shouldn't still try to save the file.
This commit is contained in:
@@ -208,8 +208,8 @@ public class GuiDesktop implements IGuiBase {
|
||||
public File getSaveFile(final File defaultFile) {
|
||||
final JFileChooser fc = new JFileChooser();
|
||||
fc.setSelectedFile(defaultFile);
|
||||
fc.showSaveDialog(null);
|
||||
return fc.getSelectedFile();
|
||||
int result = fc.showSaveDialog(null);
|
||||
return result == JFileChooser.APPROVE_OPTION ? fc.getSelectedFile() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user