[styles] Update classificator loader

This commit is contained in:
Ilya Zverev 2016-01-14 18:51:13 +03:00
parent 19ba8eb778
commit 6e71616f39
2 changed files with 10 additions and 4 deletions

View file

@ -51,12 +51,16 @@ namespace classificator
for (size_t i = 0; i < MapStyleCount; ++i)
{
MapStyle const mapStyle = static_cast<MapStyle>(i);
GetStyleReader().SetCurrentStyle(mapStyle);
// 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);

View file

@ -12,6 +12,8 @@ string DebugPrint(MapStyle mapStyle)
return "MapStyleDark";
case MapStyleClear:
return "MapStyleClear";
case MapStyleMerged:
return "MapStyleMerged";
case MapStyleCount:
break;