(svn r18486) -Fix: when switching language and you're getting a different font, recalculate the coordinates/sizes of the viewport signs. Otherwise it gets glitchy or abbreviated (in the smallmap)

This commit is contained in:
rubidium
2009-12-13 19:33:07 +00:00
parent a60ef8f92a
commit 5d6df7a8fd
4 changed files with 17 additions and 9 deletions

View File

@@ -209,6 +209,16 @@ static inline RailType UpdateRailType(RailType rt, RailType min)
return rt >= min ? (RailType)(rt + 1): rt;
}
/**
* Update the viewport coordinates of all signs.
*/
void UpdateAllVirtCoords()
{
UpdateAllStationVirtCoords();
UpdateAllSignVirtCoords();
UpdateAllTownVirtCoords();
}
/**
* Initialization of the windows and several kinds of caches.
* This is not done directly in AfterLoadGame because these
@@ -224,12 +234,9 @@ static void InitializeWindowsAndCaches()
ResetWindowSystem();
SetupColoursAndInitialWindow();
ResetViewportAfterLoadGame();
/* Update coordinates of the signs. */
UpdateAllStationVirtCoords();
UpdateAllSignVirtCoords();
UpdateAllTownVirtCoords();
UpdateAllVirtCoords();
ResetViewportAfterLoadGame();
Company *c;
FOR_ALL_COMPANIES(c) {