From 9a6b7a90e01e8687e77c0802a0384deef36f90ad Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 22 Jul 2008 20:52:30 +0000 Subject: [PATCH] (svn r13789) -Fix (r13781): Saved preset was not automatically selected. --- src/newgrf_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index fa16062b86..5134317646 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: {