From 69ee8a6840e869974ec40ab84dec42f7d5f403ee Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 3 Sep 2006 19:09:17 +0000 Subject: [PATCH] (svn r6359) -Fix: Do not reset the current cursor action when centering on a depot/hangar (noticed by Neonox) --- aircraft_gui.c | 5 +---- roadveh_gui.c | 5 +---- ship_gui.c | 5 +---- train_gui.c | 7 +++---- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/aircraft_gui.c b/aircraft_gui.c index 377b7a2073..7bbb048555 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -833,10 +833,7 @@ static void AircraftDepotWndProc(Window *w, WindowEvent *e) } break; - case 9: /* scroll to tile */ - ResetObjectToPlace(); - ScrollMainWindowToTile(w->window_number); - break; + case 9: ScrollMainWindowToTile(w->window_number); break; } break; diff --git a/roadveh_gui.c b/roadveh_gui.c index 2d0b654ed4..77ba1fb51b 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -782,10 +782,7 @@ static void RoadDepotWndProc(Window *w, WindowEvent *e) } break; - case 9: /* scroll to tile */ - ResetObjectToPlace(); - ScrollMainWindowToTile(w->window_number); - break; + case 9: ScrollMainWindowToTile(w->window_number); break; } } break; diff --git a/ship_gui.c b/ship_gui.c index 5ac87ffb49..39d40b5e48 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -773,10 +773,7 @@ static void ShipDepotWndProc(Window *w, WindowEvent *e) } break; - case 9: /* scroll to tile */ - ResetObjectToPlace(); - ScrollMainWindowToTile(w->window_number); - break; + case 9: ScrollMainWindowToTile(w->window_number); break; } break; diff --git a/train_gui.c b/train_gui.c index 62d720a211..6527570f95 100644 --- a/train_gui.c +++ b/train_gui.c @@ -658,10 +658,9 @@ static void TrainDepotWndProc(Window *w, WindowEvent *e) ResetObjectToPlace(); ShowBuildTrainWindow(w->window_number); break; - case 10: - ResetObjectToPlace(); - ScrollMainWindowToTile(w->window_number); - break; + + case 10: ScrollMainWindowToTile(w->window_number); break; + case 6: TrainDepotClickTrain(w, e->click.pt.x, e->click.pt.y); break;