diff options
author | smatz <smatz@openttd.org> | 2008-09-24 16:40:06 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-09-24 16:40:06 +0000 |
commit | 6987e6015af482de4bfa2a9233a6377d2fb1457a (patch) | |
tree | 4bdc7914fbb86480437af0957e290777e16788c6 /src/vehicle.cpp | |
parent | 7a527807d908cfd667c8d32f89435f33f2d231a6 (diff) | |
download | openttd-6987e6015af482de4bfa2a9233a6377d2fb1457a.tar.xz |
(svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 941ad8153..5a9dbca72 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2574,7 +2574,7 @@ void Vehicle::HandleLoading(bool mode) } this->cur_order_index++; - InvalidateVehicleOrder(this); + InvalidateVehicleOrder(this, 0); } CommandCost Vehicle::SendToDepot(uint32 flags, DepotCommand command) @@ -2695,7 +2695,7 @@ void Vehicle::RemoveFromShared() if (new_first->NextShared() == NULL) { /* When there is only one vehicle, remove the shared order list window. */ DeleteWindowById(GetWindowClassForVehicleType(this->type), old_window_number); - InvalidateVehicleOrder(new_first); + InvalidateVehicleOrder(new_first, 0); } else if (this->FirstShared() == this) { /* If we were the first one, update to the new first one. */ InvalidateWindowData(GetWindowClassForVehicleType(this->type), old_window_number, (new_first->index << 16) | (1 << 15)); |