mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13789) -Fix (r13781): Saved preset was not automatically selected.
This commit is contained in:
parent
06a52be95c
commit
9a6b7a90e0
|
@ -607,12 +607,14 @@ struct NewGRFWindow : public Window {
|
||||||
GetGRFPresetList(&_grf_preset_list);
|
GetGRFPresetList(&_grf_preset_list);
|
||||||
|
|
||||||
/* Switch to this preset */
|
/* Switch to this preset */
|
||||||
for (uint i = 0; i < lengthof(_grf_preset_list); i++) {
|
for (uint i = 0; i < _grf_preset_list.Length(); i++) {
|
||||||
if (_grf_preset_list[i] != NULL && strcmp(_grf_preset_list[i], str) == 0) {
|
if (_grf_preset_list[i] != NULL && strcmp(_grf_preset_list[i], str) == 0) {
|
||||||
this->preset = i;
|
this->preset = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->SetDirty();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNGRFS_SET_PARAMETERS: {
|
case SNGRFS_SET_PARAMETERS: {
|
||||||
|
|
Loading…
Reference in New Issue