diff options
author | darkvater <darkvater@openttd.org> | 2005-01-23 15:25:17 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2005-01-23 15:25:17 +0000 |
commit | c9d6ea2570c3b9460e0a239dc7bbd1620ab46e72 (patch) | |
tree | 19ce437575178a0434a9682b56bafceb06b0c6b9 /airport_gui.c | |
parent | 1cd455b8be2782590f708804f861a47a8d2fef29 (diff) | |
download | openttd-c9d6ea2570c3b9460e0a239dc7bbd1620ab46e72.tar.xz |
(svn r1617) -Fix: Ugly hack to only call ResetObjectToPlaceon childwindows of build-toolbar if the window is closed manually (with 'X'); if not checked ResetObjectToPlace is called twice resulting in undesired actions (eg. clicked button is unclicked immediately).
Diffstat (limited to 'airport_gui.c')
-rw-r--r-- | airport_gui.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/airport_gui.c b/airport_gui.c index 9c8fcb2f6..fec9af299 100644 --- a/airport_gui.c +++ b/airport_gui.c @@ -179,9 +179,6 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) case WE_CLICK: { switch(e->click.widget) { - case 0: - ResetObjectToPlace(); - break; case 3: case 4: case 5: case 6: case 7: _selected_airport_type = e->click.widget - 3; SndPlayFx(SND_15_BEEP); @@ -205,7 +202,8 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) } break; case WE_DESTROY: - ResetObjectToPlace(); + if (!WP(w,def_d).close) + ResetObjectToPlace(); break; } } |