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

Fix setting default tilesets #2442

Merged
merged 1 commit into from
Nov 10, 2024
Merged
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
9 changes: 9 additions & 0 deletions client/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4921,14 +4921,23 @@ void fill_topo_ts_default()
} else {
log_debug("Setting tileset for square topologies.");
tilespec_try_read(QString(), false, 0);
qstrncpy(gui_options->default_tileset_square_name,
tileset_basename(tileset),
sizeof(gui_options->default_tileset_square_name));
}
}
if (is_ts_option_unset("default_tileset_hex_name")) {
log_debug("Setting tileset for hex topology.");
tilespec_try_read(QString(), false, TF_HEX);
qstrncpy(gui_options->default_tileset_hex_name,
tileset_basename(tileset),
sizeof(gui_options->default_tileset_hex_name));
}
if (is_ts_option_unset("default_tileset_isohex_name")) {
log_debug("Setting tileset for isohex topology.");
tilespec_try_read(QString(), false, TF_ISO | TF_HEX);
qstrncpy(gui_options->default_tileset_isohex_name,
tileset_basename(tileset),
sizeof(gui_options->default_tileset_isohex_name));
}
}
Loading