(svn r1573) -Fix: Station and depot building mode is now terminated if the

corresponding windows are closed [ 1104277 ]
This commit is contained in:
celestar 2005-01-20 08:36:15 +00:00
parent e9c25f8274
commit f0e616ea2b
4 changed files with 29 additions and 0 deletions

View File

@ -203,6 +203,10 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w); CheckRedrawStationCoverage(w);
} break; } break;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }

View File

@ -254,6 +254,10 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w); CheckRedrawStationCoverage(w);
break; break;
} }
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }
@ -320,6 +324,10 @@ static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
if (WP(w,def_d).close) if (WP(w,def_d).close)
DeleteWindow(w); DeleteWindow(w);
break; break;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }

View File

@ -819,7 +819,12 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) {
} }
CheckRedrawStationCoverage(w); CheckRedrawStationCoverage(w);
} break; } break;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }
static const Widget _station_builder_widgets[] = { static const Widget _station_builder_widgets[] = {
@ -902,6 +907,10 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e)
if (WP(w,def_d).close) if (WP(w,def_d).close)
DeleteWindow(w); DeleteWindow(w);
return; return;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }

View File

@ -372,6 +372,10 @@ static void BuildRoadDepotWndProc(Window *w, WindowEvent *e) {
if (WP(w,def_d).close) if (WP(w,def_d).close)
DeleteWindow(w); DeleteWindow(w);
break; break;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }
@ -461,6 +465,10 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
CheckRedrawStationCoverage(w); CheckRedrawStationCoverage(w);
} break; } break;
case WE_DESTROY:
ResetObjectToPlace();
break;
} }
} }