mirror of https://github.com/OpenTTD/OpenTTD
(svn r19958) -Codechange: move common code from Waypoint and Station destructors to BaseStation destructor
parent
c4175b752a
commit
e71fd4bb57
|
@ -45,6 +45,8 @@ BaseStation::~BaseStation()
|
||||||
DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11));
|
DeleteWindowById(WC_ROADVEH_LIST, wno | (VEH_ROAD << 11));
|
||||||
DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11));
|
DeleteWindowById(WC_SHIPS_LIST, wno | (VEH_SHIP << 11));
|
||||||
DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11));
|
DeleteWindowById(WC_AIRCRAFT_LIST, wno | (VEH_AIRCRAFT << 11));
|
||||||
|
|
||||||
|
this->sign.MarkDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
Station::Station(TileIndex tile) :
|
Station::Station(TileIndex tile) :
|
||||||
|
@ -88,7 +90,6 @@ Station::~Station()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->sign.MarkDirty();
|
|
||||||
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
|
InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
|
||||||
|
|
||||||
DeleteWindowById(WC_STATION_VIEW, index);
|
DeleteWindowById(WC_STATION_VIEW, index);
|
||||||
|
|
|
@ -52,6 +52,4 @@ Waypoint::~Waypoint()
|
||||||
if (CleaningPool()) return;
|
if (CleaningPool()) return;
|
||||||
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
|
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
|
||||||
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
|
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
|
||||||
|
|
||||||
this->sign.MarkDirty();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue