mirror of https://github.com/OpenTTD/OpenTTD
(svn r14784) -Change: don't close and reopen the vehicle order/detail windows, just refocus them instead.
parent
0c352ede7a
commit
bde4b6020a
|
@ -1267,10 +1267,8 @@ static const WindowDesc _other_orders_desc = {
|
||||||
|
|
||||||
void ShowOrdersWindow(const Vehicle *v)
|
void ShowOrdersWindow(const Vehicle *v)
|
||||||
{
|
{
|
||||||
VehicleID veh = v->index;
|
DeleteWindowById(WC_VEHICLE_DETAILS, v->index);
|
||||||
|
if (BringWindowToFrontById(WC_VEHICLE_ORDERS, v->index) != NULL) return;
|
||||||
DeleteWindowById(WC_VEHICLE_ORDERS, veh);
|
|
||||||
DeleteWindowById(WC_VEHICLE_DETAILS, veh);
|
|
||||||
|
|
||||||
if (v->owner != _local_company) {
|
if (v->owner != _local_company) {
|
||||||
new OrdersWindow(&_other_orders_desc, v);
|
new OrdersWindow(&_other_orders_desc, v);
|
||||||
|
|
|
@ -1553,7 +1553,6 @@ static const WindowDesc _vehicle_details_desc = {
|
||||||
static void ShowVehicleDetailsWindow(const Vehicle *v)
|
static void ShowVehicleDetailsWindow(const Vehicle *v)
|
||||||
{
|
{
|
||||||
DeleteWindowById(WC_VEHICLE_ORDERS, v->index);
|
DeleteWindowById(WC_VEHICLE_ORDERS, v->index);
|
||||||
DeleteWindowById(WC_VEHICLE_DETAILS, v->index);
|
|
||||||
AllocateWindowDescFront<VehicleDetailsWindow>(&_vehicle_details_desc, v->index);
|
AllocateWindowDescFront<VehicleDetailsWindow>(&_vehicle_details_desc, v->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue