summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}
}