diff options
author | rubidium <rubidium@openttd.org> | 2009-01-02 20:01:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-02 20:01:28 +0000 |
commit | bde4b6020a001b78052fce910867ce07c8656f76 (patch) | |
tree | daaeb66b2873456797115cc1cf75e2f8b6212e44 /src | |
parent | 0c352ede7a5f0e961cbb9c2d1f07db8fb3a2303f (diff) | |
download | openttd-bde4b6020a001b78052fce910867ce07c8656f76.tar.xz |
(svn r14784) -Change: don't close and reopen the vehicle order/detail windows, just refocus them instead.
Diffstat (limited to 'src')
-rw-r--r-- | src/order_gui.cpp | 6 | ||||
-rw-r--r-- | src/vehicle_gui.cpp | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 7c58aa293..e31114b45 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1267,10 +1267,8 @@ static const WindowDesc _other_orders_desc = { void ShowOrdersWindow(const Vehicle *v) { - VehicleID veh = v->index; - - DeleteWindowById(WC_VEHICLE_ORDERS, veh); - DeleteWindowById(WC_VEHICLE_DETAILS, veh); + DeleteWindowById(WC_VEHICLE_DETAILS, v->index); + if (BringWindowToFrontById(WC_VEHICLE_ORDERS, v->index) != NULL) return; if (v->owner != _local_company) { new OrdersWindow(&_other_orders_desc, v); diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 8301fa86a..afa4e31d3 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1553,7 +1553,6 @@ static const WindowDesc _vehicle_details_desc = { static void ShowVehicleDetailsWindow(const Vehicle *v) { DeleteWindowById(WC_VEHICLE_ORDERS, v->index); - DeleteWindowById(WC_VEHICLE_DETAILS, v->index); AllocateWindowDescFront<VehicleDetailsWindow>(&_vehicle_details_desc, v->index); } |