mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 19:33:34 +00:00
(svn r26) Fix orderwindow issue
This commit is contained in:
parent
df26dc7687
commit
4b0d4dd3fe
10
order_gui.c
10
order_gui.c
@ -344,7 +344,15 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
|
|||||||
// check if a vehicle in a depot was clicked..
|
// check if a vehicle in a depot was clicked..
|
||||||
case WE_MOUSELOOP: {
|
case WE_MOUSELOOP: {
|
||||||
Vehicle *v = _place_clicked_vehicle;
|
Vehicle *v = _place_clicked_vehicle;
|
||||||
if (v) {
|
/*
|
||||||
|
* Check if we clicked on a vehicle
|
||||||
|
* and if the GOTO button of this window is pressed
|
||||||
|
* This is because of all open order windows WE_MOUSELOOP is called
|
||||||
|
* and if you have 3 windows open, and this check is not done
|
||||||
|
* the order is copied to the last open window instead of the
|
||||||
|
* one where GOTO is enalbed
|
||||||
|
*/
|
||||||
|
if (v && HASBIT(w->click_state, 7)) {
|
||||||
_place_clicked_vehicle = NULL;
|
_place_clicked_vehicle = NULL;
|
||||||
HandleOrderVehClick(&_vehicles[w->window_number], v, w);
|
HandleOrderVehClick(&_vehicles[w->window_number], v, w);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user