diff --git a/src/style/style_layer.cpp b/src/style/style_layer.cpp index eccadbeed..9e6de7861 100644 --- a/src/style/style_layer.cpp +++ b/src/style/style_layer.cpp @@ -48,6 +48,15 @@ void StyleLayer::setClasses(const std::vector &class_names, const t appliedProperties.add(ClassID::Fallback, begin, end, value); } } + + // Update all child layers as well. + if (layers) { + for (std::shared_ptr &layer : *layers) { + if (layer) { + layer->setClasses(class_names, now, defaultTransition); + } + } + } } // Helper function for applying all properties of a a single class that haven't been applied yet.