summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-20 08:36:15 +0000
committercelestar <celestar@openttd.org>2005-01-20 08:36:15 +0000
commitf017a27eebee6394b70ccfa34f3b7bb1ac283215 (patch)
tree7fdd85c5fc4a5b9732c1b66e22d0242c48562ad8
parentd888997b46ccaf4022c8219306fb434c0dabdff9 (diff)
downloadopenttd-f017a27eebee6394b70ccfa34f3b7bb1ac283215.tar.xz
(svn r1573) -Fix: Station and depot building mode is now terminated if the
corresponding windows are closed [ 1104277 ]
-rw-r--r--airport_gui.c4
-rw-r--r--dock_gui.c8
-rw-r--r--rail_gui.c9
-rw-r--r--road_gui.c8
4 files changed, 29 insertions, 0 deletions
diff --git a/airport_gui.c b/airport_gui.c
index 54a0e3649..f5537ecc7 100644
--- a/airport_gui.c
+++ b/airport_gui.c
@@ -203,6 +203,10 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w);
} break;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}
diff --git a/dock_gui.c b/dock_gui.c
index 70fd73510..aa9d01e25 100644
--- a/dock_gui.c
+++ b/dock_gui.c
@@ -254,6 +254,10 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w);
break;
}
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}
@@ -320,6 +324,10 @@ static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
if (WP(w,def_d).close)
DeleteWindow(w);
break;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}
diff --git a/rail_gui.c b/rail_gui.c
index 2e86c535b..de7b62b41 100644
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -819,7 +819,12 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) {
}
CheckRedrawStationCoverage(w);
} break;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
+
}
static const Widget _station_builder_widgets[] = {
@@ -902,6 +907,10 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e)
if (WP(w,def_d).close)
DeleteWindow(w);
return;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}
diff --git a/road_gui.c b/road_gui.c
index dcd59d5b6..5d23b3f04 100644
--- a/road_gui.c
+++ b/road_gui.c
@@ -372,6 +372,10 @@ static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) {
if (WP(w,def_d).close)
DeleteWindow(w);
break;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}
@@ -461,6 +465,10 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w);
} break;
+
+ case WE_DESTROY:
+ ResetObjectToPlace();
+ break;
}
}