diff options
author | frosch <frosch@openttd.org> | 2009-01-13 19:55:27 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-01-13 19:55:27 +0000 |
commit | f70b4c5ae448e8775883007af1baa32084957f73 (patch) | |
tree | 2cbb1e00ce9631d840ced6f772be9717df321c81 | |
parent | bc06145d248d130180d39efe1b84a09ad66ddfe2 (diff) | |
download | openttd-f70b4c5ae448e8775883007af1baa32084957f73.tar.xz |
(svn r15072) -Fix (r14919): Distant-join search-area was determined inconsistently.
-rw-r--r-- | src/station_gui.cpp | 10 |
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); } |