(svn r16745) -Fix [FS#3011]: invalidate JoinStation window after removing item from the pool

This commit is contained in:
smatz
2009-07-05 13:20:05 +00:00
parent 4c6a4e3ab2
commit c861d9b64b
4 changed files with 22 additions and 2 deletions

View File

@@ -94,8 +94,6 @@ Station::~Station()
/* Remove all news items */
DeleteStationNews(this->index);
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
for (CargoID c = 0; c < NUM_CARGO; c++) {
goods[c].cargo.Truncate(0);
}
@@ -108,6 +106,16 @@ Station::~Station()
}
/**
* Invalidating of the JoinStation window has to be done
* after removing item from the pool.
* @param index index of deleted item
*/
void Station::PostDestructor(size_t index)
{
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
}
/**
* Get the primary road stop (the first road stop) that the given vehicle can load/unload.
* @param v the vehicle to get the first road stop for