Changeset - r26330:d494e6a4569d
[Not reviewed]
master
0 1 0
SamuXarick - 22 months ago 2022-07-31 10:59:31
43006711+SamuXarick@users.noreply.github.com
Fix 6fe445e: Removing rail station parts without ctrl pressed was also removing tracks

The behaviour of holding ctrl key is swapped
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -696,14 +696,16 @@ struct BuildRailToolbarWindow : Window {
 
					if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) {
 
						/* Station */
 
						if (_remove_button_clicked) {
 
							Command<CMD_REMOVE_FROM_RAIL_STATION>::Post(STR_ERROR_CAN_T_REMOVE_PART_OF_STATION, CcPlaySound_CONSTRUCTION_RAIL, end_tile, start_tile, _ctrl_pressed);
 
							bool keep_rail = !_ctrl_pressed;
 
							Command<CMD_REMOVE_FROM_RAIL_STATION>::Post(STR_ERROR_CAN_T_REMOVE_PART_OF_STATION, CcPlaySound_CONSTRUCTION_RAIL, end_tile, start_tile, keep_rail);
 
						} else {
 
							HandleStationPlacement(start_tile, end_tile);
 
						}
 
					} else {
 
						/* Waypoint */
 
						if (_remove_button_clicked) {
 
							Command<CMD_REMOVE_FROM_RAIL_WAYPOINT>::Post(STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT, CcPlaySound_CONSTRUCTION_RAIL, end_tile, start_tile, _ctrl_pressed);
 
							bool keep_rail = !_ctrl_pressed;
 
							Command<CMD_REMOVE_FROM_RAIL_WAYPOINT>::Post(STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT, CcPlaySound_CONSTRUCTION_RAIL, end_tile, start_tile, keep_rail);
 
						} else {
 
							TileArea ta(start_tile, end_tile);
 
							Axis axis = select_method == VPM_X_LIMITED ? AXIS_X : AXIS_Y;
0 comments (0 inline, 0 general)