Mercurial > hg > openttd
changeset 8017:67fa2241acb1 draft
(svn r11577) -Fix: invalidate 'list trains/roadvehs/ships/planes' widgets when station part is added/removed
author | smatz <smatz@openttd.org> |
---|---|
date | Wed, 05 Dec 2007 19:13:42 +0000 |
parents | f60addd19e1a |
children | 1384db17155e |
files | src/station_cmd.cpp |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1076,6 +1076,7 @@ UpdateStationAcceptance(st, false); RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_TRAINS); /* success, so don't delete the new station */ st_auto_delete.Detach(); } @@ -1215,6 +1216,7 @@ /* if we deleted the whole station, delete the train facility. */ if (st->train_tile == 0) { st->facilities &= ~FACIL_TRAIN; + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_TRAINS); UpdateStationVirtCoordDirty(st); DeleteStationIfEmpty(st); } @@ -1279,6 +1281,7 @@ st->num_specs = 0; st->speclist = NULL; + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_TRAINS); UpdateStationVirtCoordDirty(st); DeleteStationIfEmpty(st); } @@ -1458,6 +1461,7 @@ UpdateStationAcceptance(st, false); RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_ROADVEHS); /* success, so don't delete the new station and the new road stop */ st_auto_delete.Detach(); rs_auto_delete.Detach(); @@ -1508,6 +1512,7 @@ pred->next = cur_stop->next; } + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_ROADVEHS); delete cur_stop; DoClearSquare(tile); st->rect.AfterRemoveTile(st, tile); @@ -1771,6 +1776,7 @@ UpdateStationAcceptance(st, false); RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_PLANES); /* success, so don't delete the new station */ st_auto_delete.Detach(); } @@ -1819,6 +1825,7 @@ st->airport_tile = 0; st->facilities &= ~FACIL_AIRPORT; + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_PLANES); UpdateStationVirtCoordDirty(st); DeleteStationIfEmpty(st); } @@ -1867,6 +1874,7 @@ UpdateStationAcceptance(st, false); RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_SHIPS); /* success, so don't delete the new station */ st_auto_delete.Detach(); } @@ -1908,6 +1916,8 @@ st->facilities &= ~FACIL_DOCK; st->had_vehicle_of_type &= ~HVOT_BUOY; + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_SHIPS); + /* We have to set the water tile's state to the same state as before the * buoy was placed. Otherwise one could plant a buoy on a canal edge, * remove it and flood the land (if the canal edge is at level 0) */ @@ -2029,6 +2039,7 @@ UpdateStationAcceptance(st, false); RebuildStationLists(); InvalidateWindow(WC_STATION_LIST, st->owner); + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_SHIPS); /* success, so don't delete the new station */ st_auto_delete.Detach(); } @@ -2057,6 +2068,7 @@ st->dock_tile = 0; st->facilities &= ~FACIL_DOCK; + InvalidateWindowWidget(WC_STATION_VIEW, st->index, SVW_SHIPS); UpdateStationVirtCoordDirty(st); DeleteStationIfEmpty(st); }