changeset 11959:cd370db5acc0 draft

(svn r16363) -Fix: The previously selected newgrf station type was still remembered after switching to a different game without newstations enabled, preventing stations from being built.
author peter1138 <peter1138@openttd.org>
date Thu, 21 May 2009 07:29:50 +0000
parents c0609b8a8d95
children 92d48eadb2a7
files src/rail_gui.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1007,6 +1007,11 @@
 			this->vscroll.count = _railstation.station_count;
 			this->vscroll.cap   = 5;
 			this->vscroll.pos   = Clamp(_railstation.station_type - 2, 0, this->vscroll.count - this->vscroll.cap);
+		} else {
+			/* New stations are not available, so ensure the default station
+			 * type is 'selected'. */
+			_railstation.station_class = STAT_CLASS_DFLT;
+			_railstation.station_type = 0;
 		}
 	}