Changeset - r9683:2d007131e6f7
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-07-22 20:52:30
peter1138@openttd.org
(svn r13789) -Fix (r13781): Saved preset was not automatically selected.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_gui.cpp
Show inline comments
 
@@ -604,18 +604,20 @@ struct NewGRFWindow : public Window {
 
		switch (this->query_widget) {
 
			case SNGRFS_PRESET_SAVE:
 
				SaveGRFPresetToConfig(str, this->list);
 
				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: {
 
				/* Parse our new "int list" */
 
				GRFConfig *c = this->sel;
 
				c->num_params = parse_intlist(str, (int*)c->param, lengthof(c->param));
0 comments (0 inline, 0 general)