Commit f073f240 authored by Volker Krause's avatar Volker Krause
Browse files

Handle default layer selector

parent 8303479c
Pipeline #65283 passed with stage
in 23 seconds
......@@ -134,3 +134,7 @@ way[railway=tram]::tram {
color: #303030;
z-index: 1;
}
// default layer selector
node::default {
icon-image: "bla";
}
......@@ -157,3 +157,8 @@ way[railway=tram]::tram
z-index: 1;
}
node
{
icon-image: "bla";
}
......@@ -154,5 +154,8 @@ ClassSelectorKey MapCSSParser::makeClassSelector(const char *str, std::size_t le
LayerSelectorKey MapCSSParser::makeLayerSelector(const char *str, std::size_t len)
{
if (!str || std::strcmp(str, "default") == 0) {
return {};
}
return MapCSSStylePrivate::get(m_currentStyle)->m_layerSelectorRegistry.makeKey(str, len, OSM::StringMemory::Transient);
}
......@@ -198,9 +198,7 @@ BasicSelector:
$$->setObjectType($I.str, $I.len);
$$->setZoomRange($Z.low, $Z.high);
$$->setConditions($T);
if ($L.str) {
$$->setLayer(parser->makeLayerSelector($L.str, $L.len));
}
$$->setLayer(parser->makeLayerSelector($L.str, $L.len));
}
| T_STAR ClassSelector[C] ZoomRange[Z] Tests[T] LayerSelector[L] {
$$ = new MapCSSBasicSelector;
......@@ -210,9 +208,7 @@ BasicSelector:
}
$$->setZoomRange($Z.low, $Z.high);
$$->setConditions($T);
if ($L.str) {
$$->setLayer(parser->makeLayerSelector($L.str, $L.len));
}
$$->setLayer(parser->makeLayerSelector($L.str, $L.len));
}
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment