Search in sources :

Example 1 with MapImportDialog

use of org.pepsoft.worldpainter.importing.MapImportDialog in project WorldPainter by Captain-Chaos.

the class App method importWorld.

private void importWorld() {
    if (!saveIfNecessary()) {
        return;
    }
    if (!Configuration.getInstance().isImportWarningDisplayed()) {
        showMessageDialog(this, strings.getString("the.import.functionality.only.imports.the.i.landscape"), strings.getString("information"), INFORMATION_MESSAGE);
    }
    MapImportDialog dialog = new MapImportDialog(this);
    dialog.setVisible(true);
    if (!dialog.isCancelled()) {
        setWorld(dialog.getImportedWorld());
        lastSelectedFile = null;
        Configuration config = Configuration.getInstance();
        config.setImportWarningDisplayed(true);
        enableImportedWorldOperation();
    }
}
Also used : MapImportDialog(org.pepsoft.worldpainter.importing.MapImportDialog)

Aggregations

MapImportDialog (org.pepsoft.worldpainter.importing.MapImportDialog)1