1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #9314: Trying to delete ride piece while paused moves the selection (#9332)

Failed track removal was triggering a move to the next piece. Changed to move only upon successful removal.
This commit is contained in:
aw20368
2019-05-30 14:51:56 -04:00
committed by Michael Steenbeek
parent bc14f427a5
commit 02ef545f1b

View File

@@ -1932,12 +1932,15 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
{ _currentTrackBegin.x, _currentTrackBegin.y, _currentTrackBegin.z, _currentTrackPieceDirection });
trackRemoveAction.SetCallback([=](const GameAction* ga, const GameActionResult* result) {
_stationConstructed = get_ride(w->number)->num_stations != 0;
window_ride_construction_mouseup_demolish_next_piece(x, y, z, direction, type);
if (result->Error != GA_ERROR::OK)
{
window_ride_construction_update_active_elements();
}
else
{
_stationConstructed = get_ride(w->number)->num_stations != 0;
window_ride_construction_mouseup_demolish_next_piece(x, y, z, direction, type);
}
});
GameActions::Execute(&trackRemoveAction);