(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, ...
This commit is contained in:
smatz
2008-09-24 16:40:06 +00:00
parent 7a527807d9
commit 6987e6015a
11 changed files with 209 additions and 78 deletions

View File

@@ -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));