From 0f9be95e03262fc8155f0008eb4cd05a6d074a52 Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 17 Mar 2010 20:19:55 +0000 Subject: (svn r19445) -Change: No need to drag an area when overbuilding bridges. --- src/rail_gui.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/rail_gui.cpp') diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index c30e63017..1d9302872 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -254,7 +254,14 @@ static void GenericPlaceSignals(TileIndex tile) static void PlaceRail_Bridge(TileIndex tile) { - VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE); + if (IsBridgeTile(tile)) { + TileIndex other_tile = GetOtherTunnelBridgeEnd(tile); + Window *w = GetCallbackWnd(); + Point pt = {0, 0}; + if (w != NULL) w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, tile, other_tile); + } else { + VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE); + } } /** Command callback for building a tunnel */ -- cgit v1.2.3-54-g00ecf