* Delete a NewGRF configuration by preset name. * @param config_name Name of the preset. */
| 1593 | * @param config_name Name of the preset. |
| 1594 | */ |
| 1595 | void DeleteGRFPresetFromConfig(std::string_view config_name) |
| 1596 | { |
| 1597 | std::string section("preset-"); |
| 1598 | section += config_name; |
| 1599 | |
| 1600 | ConfigIniFile ini(_config_file); |
| 1601 | ini.RemoveGroup(section); |
| 1602 | ini.SaveToDisk(_config_file); |
| 1603 | } |
| 1604 | |
| 1605 | /** |
| 1606 | * Handle changing a value. This performs validation of the input value and |
no test coverage detected