summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-11-27 22:43:58 +0000
committerterkhen <terkhen@openttd.org>2010-11-27 22:43:58 +0000
commitae78847f0fe2c0bde677e4a9f2ae26913b9d0f20 (patch)
tree6953642b2704ef01aaef57d00ea42e99589c0d4a
parentf2cc73bb517b0145455bc216f9729ad4ee878e1e (diff)
downloadopenttd-ae78847f0fe2c0bde677e4a9f2ae26913b9d0f20.tar.xz
(svn r21342) -Add: Sort some lists again after a language change.
-rw-r--r--src/strings.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index f85ae82a4..03e6521cf 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -35,6 +35,7 @@
#include "string_func.h"
#include "company_base.h"
#include "smallmap_gui.h"
+#include "window_func.h"
#include "debug.h"
#include "table/strings.h"
@@ -1391,10 +1392,19 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
strecpy(_config_language_file, c_file, lastof(_config_language_file));
SetCurrentGrfLangID(_current_language->newgrflangid);
+ /* Some lists need to be sorted again after a language change. */
InitializeSortedCargoSpecs();
SortIndustryTypes();
BuildIndustriesLegend();
SortNetworkLanguages();
+ InvalidateWindowClassesData(WC_BUILD_VEHICLE); // Build vehicle window.
+ InvalidateWindowClassesData(WC_TRAINS_LIST); // Train group window.
+ InvalidateWindowClassesData(WC_ROADVEH_LIST); // Road vehicle group window.
+ InvalidateWindowClassesData(WC_SHIPS_LIST); // Ship group window.
+ InvalidateWindowClassesData(WC_AIRCRAFT_LIST); // Aircraft group window.
+ InvalidateWindowClassesData(WC_INDUSTRY_DIRECTORY); // Industry directory window.
+ InvalidateWindowClassesData(WC_STATION_LIST); // Station list window.
+
return true;
}