changeset 9683:17cf35beb54b draft

(svn r13789) -Fix (r13781): Saved preset was not automatically selected.
author peter1138 <peter1138@openttd.org>
date Tue, 22 Jul 2008 20:52:30 +0000
parents ed50c006a790
children cd3853d469ce
files src/newgrf_gui.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -607,12 +607,14 @@
 				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: {