Fix so Save and Open dialogs appear over main window

This commit is contained in:
drdev
2013-11-29 02:59:22 +00:00
parent e8e5ac2ca7
commit e467f44bf2
2 changed files with 4 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ public interface IVDoc<TCDoc extends ICDoc> {
/** Retrieves control object associated with this document. /** Retrieves control object associated with this document.
* @return {@link forge.gui.home.ICSubmenu} * @return {@link forge.gui.home.ICSubmenu}
*/ */
TCDoc getLayoutControl(); TCDoc getLayoutControl();
/** Sets the current parent cell of this view, /** Sets the current parent cell of this view,
* allowing access to its body and head sections. * allowing access to its body and head sections.

View File

@@ -21,6 +21,7 @@ package forge.gui.toolbox;
import java.io.File; import java.io.File;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.filechooser.FileNameExtensionFilter;
@@ -79,7 +80,7 @@ public class SaveOpenDialog extends JPanel {
fc.addChoosableFileFilter(filter); fc.addChoosableFileFilter(filter);
} }
int RetValue = fc.showOpenDialog(getParent()); int RetValue = fc.showOpenDialog(JOptionPane.getRootFrame());
if (RetValue == JFileChooser.APPROVE_OPTION) { if (RetValue == JFileChooser.APPROVE_OPTION) {
final File RetFile = fc.getSelectedFile(); final File RetFile = fc.getSelectedFile();
return RetFile; return RetFile;
@@ -106,7 +107,7 @@ public class SaveOpenDialog extends JPanel {
fc.addChoosableFileFilter(filter); fc.addChoosableFileFilter(filter);
} }
int RetValue = fc.showSaveDialog(getParent()); int RetValue = fc.showSaveDialog(JOptionPane.getRootFrame());
/* user picked save */ /* user picked save */
if (RetValue == JFileChooser.APPROVE_OPTION) { if (RetValue == JFileChooser.APPROVE_OPTION) {