diff options
author | peter1138 <peter1138@openttd.org> | 2008-07-22 20:52:30 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-07-22 20:52:30 +0000 |
commit | 417a56cf993d4c469d92b89a78b8667cad8e352e (patch) | |
tree | 561b55f7203884d037b5a60d193f0f5743915c17 /src | |
parent | 766e57df5ffc711c633fca230b1fcce044ee9e4d (diff) | |
download | openttd-417a56cf993d4c469d92b89a78b8667cad8e352e.tar.xz |
(svn r13789) -Fix (r13781): Saved preset was not automatically selected.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_gui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index fa16062b8..513431764 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -607,12 +607,14 @@ struct NewGRFWindow : public Window { GetGRFPresetList(&_grf_preset_list); /* 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) { this->preset = i; break; } } + + this->SetDirty(); break; case SNGRFS_SET_PARAMETERS: { |