From 8feedf7fc2f9b41a48d9f02ea572d312514f115f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Fri, 27 Jun 2014 19:15:33 +0200 Subject: [PATCH] also update child layers --- src/style/style_layer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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.