mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix so Save and Open dialogs appear over main window
This commit is contained in:
@@ -30,7 +30,7 @@ public interface IVDoc<TCDoc extends ICDoc> {
|
||||
/** Retrieves control object associated with this document.
|
||||
* @return {@link forge.gui.home.ICSubmenu}
|
||||
*/
|
||||
TCDoc getLayoutControl();
|
||||
TCDoc getLayoutControl();
|
||||
|
||||
/** Sets the current parent cell of this view,
|
||||
* allowing access to its body and head sections.
|
||||
|
||||
@@ -21,6 +21,7 @@ package forge.gui.toolbox;
|
||||
import java.io.File;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
@@ -79,7 +80,7 @@ public class SaveOpenDialog extends JPanel {
|
||||
fc.addChoosableFileFilter(filter);
|
||||
}
|
||||
|
||||
int RetValue = fc.showOpenDialog(getParent());
|
||||
int RetValue = fc.showOpenDialog(JOptionPane.getRootFrame());
|
||||
if (RetValue == JFileChooser.APPROVE_OPTION) {
|
||||
final File RetFile = fc.getSelectedFile();
|
||||
return RetFile;
|
||||
@@ -106,7 +107,7 @@ public class SaveOpenDialog extends JPanel {
|
||||
fc.addChoosableFileFilter(filter);
|
||||
}
|
||||
|
||||
int RetValue = fc.showSaveDialog(getParent());
|
||||
int RetValue = fc.showSaveDialog(JOptionPane.getRootFrame());
|
||||
|
||||
/* user picked save */
|
||||
if (RetValue == JFileChooser.APPROVE_OPTION) {
|
||||
|
||||
Reference in New Issue
Block a user