Skip to content

Commit

Permalink
Restore visibility of GTP console at startup for featurecat#777
Browse files Browse the repository at this point in the history
  • Loading branch information
hope366 committed Oct 11, 2020
1 parent 6992d4b commit fe00cdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/featurecat/lizzie/Lizzie.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void main(String[] args) throws IOException {
config = new Config();
frame = config.panelUI ? new LizzieMain() : new LizzieFrame();
gtpConsole = new GtpConsolePane(frame);
gtpConsole.setVisible(config.leelazConfig.optBoolean("print-comms", false));
gtpConsole.setVisible(config.persistedUi.optBoolean("gtp-console-opened", false));
initializeEngineManager();
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/featurecat/lizzie/util/WindowPosition.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static JSONObject create(JSONObject ui) {

ui.put("window-maximized", false);
ui.put("toolbar-position", "South");
ui.put("gtp-console-opened", false);

return ui;
}
Expand All @@ -52,6 +53,7 @@ public static JSONObject save(JSONObject ui) {
ui.put("window-maximized", windowIsMaximized);
ui.put("toolbar-position", Lizzie.config.toolbarPosition);
ui.put("board-position-proportion", Lizzie.frame.boardPositionProportion);
ui.put("gtp-console-opened", Lizzie.gtpConsole.isVisible());

JSONArray mainPos = new JSONArray();
if (!windowIsMaximized) {
Expand Down

0 comments on commit fe00cdb

Please sign in to comment.