Map layer name comparison should be case insensitive

This commit is contained in:
Dan Paulat 2023-07-14 00:22:32 -05:00
parent 9c27b2cd29
commit d694764fa1

View file

@ -674,13 +674,14 @@ void MapWidget::AddLayers()
const std::string layer = qlayer.toStdString();
// Draw below layers defined in map style
auto it = std::find_if(mapStyle.drawBelow_.cbegin(),
mapStyle.drawBelow_.cend(),
[&layer](const std::string& styleLayer) -> bool
{
std::regex re {styleLayer};
return std::regex_match(layer, re);
});
auto it = std::find_if(
mapStyle.drawBelow_.cbegin(),
mapStyle.drawBelow_.cend(),
[&layer](const std::string& styleLayer) -> bool
{
std::regex re {styleLayer, std::regex_constants::icase};
return std::regex_match(layer, re);
});
if (it != mapStyle.drawBelow_.cend())
{