[editor] Fixed bug with some types being not editable.

This commit is contained in:
Alex Zolotarev 2016-01-27 17:55:20 +03:00 committed by Sergey Yershov
parent 73a9c918a9
commit a382c1a7c8

View file

@ -200,8 +200,10 @@ static unordered_map<string, TypeDescription> const gEditableTypes = {
{"tourism-viewpoint", {{}, true, false}},
{"waterway-waterfall", {{EType::FMD_HEIGHT}, true, false}}};
TypeDescription const * GetTypeDescription(uint32_t const type)
TypeDescription const * GetTypeDescription(uint32_t type, uint8_t typeTruncateLevel = 2)
{
// Truncate is needed to match, for example, amenity-restaurant-vegan as amenity-restaurant.
ftype::TruncValue(type, typeTruncateLevel);
auto const readableType = classif().GetReadableObjectName(type);
auto const it = gEditableTypes.find(readableType);
if (it != end(gEditableTypes))