mirror of https://github.com/OpenTTD/OpenTTD
(svn r16766) -Codechange: remove station->MarkDirty. It is in all cases meant to only update the sign and not invalidate the widget; the widget would be invalidated by a call before/after the call to MarkDirty or it wouldn't make sense because e.g. the window doesn't exist anymore/yet.
parent
3fb1506d6d
commit
9ae07bba85
|
@ -75,7 +75,7 @@ Station::~Station()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->MarkDirty();
|
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);
|
||||||
|
@ -151,14 +151,6 @@ void Station::AddFacility(StationFacility new_facility_bit, TileIndex facil_xy)
|
||||||
this->build_date = _date;
|
this->build_date = _date;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Station::MarkDirty() const
|
|
||||||
{
|
|
||||||
if (this->sign.width_normal != 0) {
|
|
||||||
InvalidateWindowWidget(WC_STATION_VIEW, index, SVW_CAPTION);
|
|
||||||
this->sign.MarkDirty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Station::MarkTilesDirty(bool cargo_change) const
|
void Station::MarkTilesDirty(bool cargo_change) const
|
||||||
{
|
{
|
||||||
TileIndex tile = this->train_tile;
|
TileIndex tile = this->train_tile;
|
||||||
|
|
|
@ -147,13 +147,6 @@ public:
|
||||||
|
|
||||||
void AddFacility(StationFacility new_facility_bit, TileIndex facil_xy);
|
void AddFacility(StationFacility new_facility_bit, TileIndex facil_xy);
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark the sign of a station dirty for repaint.
|
|
||||||
*
|
|
||||||
* @ingroup dirty
|
|
||||||
*/
|
|
||||||
void MarkDirty() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks the tiles of the station as dirty.
|
* Marks the tiles of the station as dirty.
|
||||||
*
|
*
|
||||||
|
|
|
@ -403,9 +403,9 @@ void UpdateAllStationVirtCoord()
|
||||||
*/
|
*/
|
||||||
static void UpdateStationVirtCoordDirty(Station *st)
|
static void UpdateStationVirtCoordDirty(Station *st)
|
||||||
{
|
{
|
||||||
st->MarkDirty();
|
st->sign.MarkDirty();
|
||||||
st->UpdateVirtCoord();
|
st->UpdateVirtCoord();
|
||||||
st->MarkDirty();
|
st->sign.MarkDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get a mask of the cargo types that the station accepts.
|
/** Get a mask of the cargo types that the station accepts.
|
||||||
|
|
Loading…
Reference in New Issue