Merge pull request #3232 from Zverik/restore_classif

[classificator] Restore old classificator loading algorythm
This commit is contained in:
Sergey Yershov 2016-05-17 14:11:44 +04:00
commit 05f04ead49

View file

@ -45,17 +45,25 @@ namespace classificator
LOG(LDEBUG, ("Reading of classificator started"));
Platform & p = GetPlatform();
StyleReader & reader = GetStyleReader();
for (auto style : { MapStyleLight, MapStyleDark, MapStyleClear })
MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle();
for (size_t i = 0; i < MapStyleCount; ++i)
{
reader.SetCurrentStyle(style);
MapStyle const mapStyle = static_cast<MapStyle>(i);
// Read the merged style only if it was requested.
if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged)
{
GetStyleReader().SetCurrentStyle(mapStyle);
ReadCommon(p.GetReader("classificator.txt"),
p.GetReader("types.txt"));
ReadCommon(p.GetReader("classificator.txt"), p.GetReader("types.txt"));
drule::LoadRules();
drule::LoadRules();
}
}
GetStyleReader().SetCurrentStyle(originMapStyle);
LOG(LDEBUG, ("Reading of classificator finished"));
}
}