|
|
|
@ -153,6 +153,13 @@ public:
|
|
|
|
|
this->owner = v->owner;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
~CargoTypeOrdersWindow()
|
|
|
|
|
{
|
|
|
|
|
if (!FocusWindowById(WC_VEHICLE_ORDERS, this->window_number)) {
|
|
|
|
|
MarkAllRouteStepsDirty(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
|
|
|
|
{
|
|
|
|
|
if (widget == WID_CTO_HEADER) {
|
|
|
|
@ -241,6 +248,22 @@ public:
|
|
|
|
|
SetDParam(2, this->vehicle->GetOrder(this->order_id)->GetDestination());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void OnFocus(Window *previously_focused_window) OVERRIDE
|
|
|
|
|
{
|
|
|
|
|
if (HasFocusedVehicleChanged(this->window_number, previously_focused_window)) {
|
|
|
|
|
MarkAllRoutePathsDirty(this->vehicle);
|
|
|
|
|
MarkAllRouteStepsDirty(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void OnFocusLost(Window *newly_focused_window) OVERRIDE
|
|
|
|
|
{
|
|
|
|
|
if (HasFocusedVehicleChanged(this->window_number, newly_focused_window)) {
|
|
|
|
|
MarkAllRoutePathsDirty(this->vehicle);
|
|
|
|
|
MarkAllRouteStepsDirty(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1289,6 +1312,8 @@ public:
|
|
|
|
|
|
|
|
|
|
~OrdersWindow()
|
|
|
|
|
{
|
|
|
|
|
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->window_number, false);
|
|
|
|
|
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->window_number, false);
|
|
|
|
|
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
|
|
|
|
|
MarkAllRouteStepsDirty(this);
|
|
|
|
|
}
|
|
|
|
|