mirror of https://github.com/FreeCol/freecol.git
Bugfix: Closes old map editor dialogs that depends on the old map when creating a new map or loading a map.
This commit is contained in:
parent
ab4b40c2db
commit
16b98ecf42
|
@ -366,6 +366,7 @@ public final class MapEditorController extends FreeColClientHolder {
|
|||
final GUI gui = getGUI();
|
||||
|
||||
fcc.setMapEditor(true);
|
||||
getGUI().removeInGameComponents();
|
||||
gui.showStatusPanel(Messages.message("status.loadingGame"));
|
||||
|
||||
final File theFile = file;
|
||||
|
@ -382,10 +383,8 @@ public final class MapEditorController extends FreeColClientHolder {
|
|||
requireNativeNations(game);
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
gui.closeStatusPanel();
|
||||
getGUI().startMapEditorGUI();
|
||||
gui.setFocus(game.getMap().getTile(1,1));
|
||||
gui.enableEditorTransformPanel(true);
|
||||
gui.enableMapControls(getClientOptions().getBoolean(ClientOptions.DISPLAY_MAP_CONTROLS));
|
||||
gui.updateMenuBar();
|
||||
gui.refresh();
|
||||
});
|
||||
} catch (FileNotFoundException fnfe) {
|
||||
|
|
|
@ -70,10 +70,10 @@ public class NewEmptyMapAction extends MapboardAction {
|
|||
Map map = getFreeColClient().getFreeColServer()
|
||||
.generateEmptyMap(size.width, size.height);
|
||||
Tile tile = map.getTile(size.width/2, size.height/2);
|
||||
getGUI().enableEditorTransformPanel(true);
|
||||
getGUI().enableMapControls(getClientOptions().getBoolean(ClientOptions.DISPLAY_MAP_CONTROLS));
|
||||
getGUI().removeInGameComponents();
|
||||
getGUI().startMapEditorGUI();
|
||||
getGUI().refresh();
|
||||
getGUI().setFocus(tile);
|
||||
getGUI().updateMenuBar();
|
||||
getGUI().refresh();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue