summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-01-13 19:55:27 +0000
committerfrosch <frosch@openttd.org>2009-01-13 19:55:27 +0000
commitdab9de2e61379a1ef6ddcfb07e65ab09d9a370d3 (patch)
tree2cbb1e00ce9631d840ced6f772be9717df321c81
parentb8963032e7f86615ed57c0cca63dc74a65fdff69 (diff)
downloadopenttd-dab9de2e61379a1ef6ddcfb07e65ab09d9a370d3.tar.xz
(svn r15072) -Fix (r14919): Distant-join search-area was determined inconsistently.
-rw-r--r--src/station_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 47ec4cce1..f0bfae69d 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -1102,12 +1102,12 @@ struct SelectStationWindow : Window {
int size_x; ///< Size in x direction of new station
int size_y; ///< Size in y direction of new station
- SelectStationWindow(const WindowDesc *desc, CommandContainer cmd) :
+ SelectStationWindow(const WindowDesc *desc, CommandContainer cmd, int w, int h) :
Window(desc, 0),
select_station_cmd(cmd),
- tile(TileVirtXY(_thd.pos.x, _thd.pos.y)),
- size_x(_thd.size.x / TILE_SIZE),
- size_y(_thd.size.y / TILE_SIZE)
+ tile(cmd.tile),
+ size_x(w),
+ size_y(h)
{
this->vscroll.cap = 6;
this->resize.step_height = 10;
@@ -1243,7 +1243,7 @@ void ShowSelectStationIfNeeded(CommandContainer cmd, int w, int h)
{
if (StationJoinerNeeded(cmd, w, h)) {
if (BringWindowToFrontById(WC_SELECT_STATION, 0)) return;
- new SelectStationWindow(&_select_station_desc, cmd);
+ new SelectStationWindow(&_select_station_desc, cmd, w, h);
} else {
DoCommandP(&cmd);
}