diff options
author | rubidium <rubidium@openttd.org> | 2009-07-08 12:01:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-08 12:01:26 +0000 |
commit | 9ae07bba8546ab1f1cdf4f58c9b31af944325c43 (patch) | |
tree | 89fed2986d6c1c13c1d84989456fd4359ae3a78a | |
parent | 3fb1506d6d71fcc124779f7f4a7ede68d9970636 (diff) | |
download | openttd-9ae07bba8546ab1f1cdf4f58c9b31af944325c43.tar.xz |
(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.
-rw-r--r-- | src/station.cpp | 10 | ||||
-rw-r--r-- | src/station_base.h | 7 | ||||
-rw-r--r-- | src/station_cmd.cpp | 4 |
3 files changed, 3 insertions, 18 deletions
diff --git a/src/station.cpp b/src/station.cpp index db2c50969..b4b26e2df 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -75,7 +75,7 @@ Station::~Station() } } - this->MarkDirty(); + this->sign.MarkDirty(); InvalidateWindowData(WC_STATION_LIST, this->owner, 0); DeleteWindowById(WC_STATION_VIEW, index); @@ -151,14 +151,6 @@ void Station::AddFacility(StationFacility new_facility_bit, TileIndex facil_xy) 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 { TileIndex tile = this->train_tile; diff --git a/src/station_base.h b/src/station_base.h index 61be43715..1af0a067a 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -148,13 +148,6 @@ public: 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. * * @ingroup dirty diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 8990c2e65..fa8cb76e2 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -403,9 +403,9 @@ void UpdateAllStationVirtCoord() */ static void UpdateStationVirtCoordDirty(Station *st) { - st->MarkDirty(); + st->sign.MarkDirty(); st->UpdateVirtCoord(); - st->MarkDirty(); + st->sign.MarkDirty(); } /** Get a mask of the cargo types that the station accepts. |