summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rail_gui.cpp10
-rw-r--r--src/road_gui.cpp2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 1b107bb3b..3e90151cf 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -516,8 +516,7 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e)
if (_ctrl_pressed) _remove_button_clicked = true;
HandleAutodirPlacement();
_remove_button_clicked = old;
- break;
- }
+ } break;
case DDSP_BUILD_SIGNALS:
HandleAutoSignalPlacement();
@@ -540,9 +539,12 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e)
break;
case DDSP_PLACE_RAIL_NE:
- case DDSP_PLACE_RAIL_NW:
+ case DDSP_PLACE_RAIL_NW: {
+ bool old = _remove_button_clicked;
+ if (_ctrl_pressed) _remove_button_clicked = true;
DoRailroadTrack(e->we.place.select_proc == DDSP_PLACE_RAIL_NE ? TRACK_X : TRACK_Y);
- break;
+ _remove_button_clicked = old;
+ } break;
}
}
break;
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 0be5a0355..e66e083c0 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -504,7 +504,7 @@ static void BuildRoadToolbWndProc(Window *w, WindowEvent *e)
_place_road_flag = (RoadFlags)((_place_road_flag & RF_DIR_Y) ? (_place_road_flag & 0x07) : (_place_road_flag >> 3));
DoCommandP(end_tile, start_tile, _place_road_flag | (_cur_roadtype << 3) | _ctrl_pressed << 5, CcPlaySound1D,
- _remove_button_clicked ?
+ (_ctrl_pressed || _remove_button_clicked) ?
CMD_REMOVE_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_road) :
CMD_BUILD_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_road));
break;