summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-05-21 07:29:50 +0000
committerpeter1138 <peter1138@openttd.org>2009-05-21 07:29:50 +0000
commitb801d801b56b48cc072aca21ab85e4d52b7d22ab (patch)
tree7ab3c954ca1486a35098d7c5726e595befdce76a /src
parent2d8d5580b698fdc7ba14078a9a926b1781a94852 (diff)
downloadopenttd-b801d801b56b48cc072aca21ab85e4d52b7d22ab.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/rail_gui.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 0fbf12cd4..3977bfc63 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1007,6 +1007,11 @@ public:
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;
}
}