mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
Set parent component for Save/Open file dialogs
This commit is contained in:
@@ -2349,9 +2349,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
fc.setAcceptAllFileFilterUsed(false);
|
||||
JFrame f = new JFrame();
|
||||
View.setWindowIcon(f);
|
||||
if (fc.showSaveDialog(f) == JFileChooser.APPROVE_OPTION) {
|
||||
if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||
Configuration.lastOpenDir.set(Helper.fixDialogFile(fc.getSelectedFile()).getParentFile().getAbsolutePath());
|
||||
File sf = Helper.fixDialogFile(fc.getSelectedFile());
|
||||
|
||||
@@ -3267,9 +3265,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
first = false;
|
||||
}
|
||||
|
||||
JFrame f = new JFrame();
|
||||
View.setWindowIcon(f);
|
||||
if (fc.showOpenDialog(f) == JFileChooser.APPROVE_OPTION) {
|
||||
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||
File result = fc.getSelectedFile();
|
||||
Configuration.lastOpenDir.set(Helper.fixDialogFile(result).getParentFile().getAbsolutePath());
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user