diff --git a/editor/editor_config.cpp b/editor/editor_config.cpp index c42169b982..73480f6676 100644 --- a/editor/editor_config.cpp +++ b/editor/editor_config.cpp @@ -137,7 +137,7 @@ bool EditorConfig::GetTypeDescription(vector const & classificatorTypes, vector EditorConfig::GetTypesThatCanBeAdded() const { - auto const xpathResult = m_document.select_nodes("/mapsme/editor/types/type[not(@can_add='no')]"); + auto const xpathResult = m_document.select_nodes("/mapsme/editor/types/type[not(@can_add='no' or @editable='no')]"); vector result; for (auto const xNode : xpathResult) result.emplace_back(xNode.node().attribute("id").value()); diff --git a/editor/editor_tests/editor_config_test.cpp b/editor/editor_tests/editor_config_test.cpp index 93d4c9ba93..7fbb92d920 100644 --- a/editor/editor_tests/editor_config_test.cpp +++ b/editor/editor_tests/editor_config_test.cpp @@ -60,4 +60,6 @@ UNIT_TEST(EditorConfig_GetTypesThatGenBeAdded) auto const types = config.GetTypesThatCanBeAdded(); TEST(find(begin(types), end(types), "amenity-cafe") != end(types), ()); TEST(find(begin(types), end(types), "natural-peak") == end(types), ()); + // Marked as "editable=no". + TEST(find(begin(types), end(types), "aeroway-airport") == end(types), ()); }