Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of small fixes 001 #819

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.classpath
.project
.settings
gtp.log
persist.properties
persist
lizzie.properties
Expand All @@ -15,3 +19,4 @@ target
leelaz_opencl_tuning
*.sh
*.jar
gtp_logs
11 changes: 6 additions & 5 deletions src/main/java/featurecat/lizzie/Lizzie.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,17 @@ public static void main(String[] args) throws IOException {
public static void initializeEngineManager() {
try {
engineManager = new EngineManager(config);
if (mainArgs.length == 1) {
frame.loadFile(new File(mainArgs[0]));
} else if (config.config.getJSONObject("ui").getBoolean("resume-previous-game")) {
board.resumePreviousGame();
}
} catch (IOException e) {
frame.openConfigDialog();
JOptionPane.showMessageDialog(frame, "Please restart Lizzie to apply changes.");
System.exit(1);
}

if (mainArgs.length == 1) {
frame.loadFile(new File(mainArgs[0]));
} else if (config.config.getJSONObject("ui").getBoolean("resume-previous-game")) {
board.resumePreviousGame();
}
}

public static void initializeAfterVersionCheck(Leelaz lz) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/featurecat/lizzie/gui/ConfigDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1829,9 +1829,8 @@ private String getEngineLine() {
new FileNameExtensionFilter(
resourceBundle.getString("LizzieConfig.title.engine"), "exe", "bat", "sh");
chooser.setFileFilter(filter);
} else {
setVisible(false);
}

chooser.setMultiSelectionEnabled(false);
chooser.setDialogTitle(resourceBundle.getString("LizzieConfig.prompt.selectEngine"));
int result = chooser.showOpenDialog(this);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/featurecat/lizzie/gui/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ public void actionPerformed(ActionEvent e) {
Lizzie.config.showKataGoEstimate = false;
if (Lizzie.leelaz.isPondering()) Lizzie.leelaz.ponder();
Lizzie.frame.removeEstimateRect();
Lizzie.config.uiConfig.put("show-katago-estimate", Lizzie.config.showKataGoEstimate);
try {
Lizzie.config.save();
} catch (IOException es) {
// TODO Auto-generated catch block
}
}
});

Expand Down Expand Up @@ -1386,6 +1392,7 @@ public void updateEngineMenu(List<Leelaz> engineList) {
if (engineDt != null) {
if (engineDt.currentWeight() != "")
engine[i].setText(engine[i].getText() + " : " + engineDt.currentWeight());
engine[i].setToolTipText(engineDt.engineCommand());
engine[i].setVisible(true);
int a = i;
engine[i].addActionListener(
Expand Down