mirror of https://github.com/OpenTTD/OpenTTD
(svn r21864) -Fix [FS#4430]: distant-join station would build at the wrong location when having persistent building turned on and selecting a "second" location for the station tile
parent
6435a89c28
commit
89a135293a
|
@ -1481,8 +1481,6 @@ static bool StationJoinerNeeded(CommandContainer cmd, TileArea ta)
|
||||||
* return true (i.e. just flash the old window) */
|
* return true (i.e. just flash the old window) */
|
||||||
Window *selection_window = FindWindowById(WC_SELECT_STATION, 0);
|
Window *selection_window = FindWindowById(WC_SELECT_STATION, 0);
|
||||||
if (selection_window != NULL) {
|
if (selection_window != NULL) {
|
||||||
if (!_ctrl_pressed) return true;
|
|
||||||
|
|
||||||
/* Abort current distant-join and start new one */
|
/* Abort current distant-join and start new one */
|
||||||
delete selection_window;
|
delete selection_window;
|
||||||
UpdateTileSelection();
|
UpdateTileSelection();
|
||||||
|
@ -1512,7 +1510,6 @@ void ShowSelectBaseStationIfNeeded(CommandContainer cmd, TileArea ta)
|
||||||
{
|
{
|
||||||
if (StationJoinerNeeded<T>(cmd, ta)) {
|
if (StationJoinerNeeded<T>(cmd, ta)) {
|
||||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||||
if (BringWindowToFrontById(WC_SELECT_STATION, 0)) return;
|
|
||||||
new SelectStationWindow<T>(&_select_station_desc, cmd, ta);
|
new SelectStationWindow<T>(&_select_station_desc, cmd, ta);
|
||||||
} else {
|
} else {
|
||||||
DoCommandP(&cmd);
|
DoCommandP(&cmd);
|
||||||
|
|
Loading…
Reference in New Issue