diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-06-16 16:48:21 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-06-16 16:48:21 +0200 |
commit | e3b9e9abf65a9926d01e45a6717dedbd11f21561 (patch) | |
tree | 71573b198a8f1005fd50ba7cc346bc8d7919f53c /src/style/style.cpp | |
parent | 4a41b02cefcba67d6c4cfa061e7bf2e19a7f49f1 (diff) | |
download | qtlocation-mapboxgl-e3b9e9abf65a9926d01e45a6717dedbd11f21561.tar.gz |
make code more concise
Diffstat (limited to 'src/style/style.cpp')
-rw-r--r-- | src/style/style.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/style/style.cpp b/src/style/style.cpp index 0b842772c5..f5c4d8043e 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -107,11 +107,14 @@ void Style::cascadeProperties(FillProperties &properties, const ClassProperties& if (const Color *fillStrokeColor = klass.get<Color>(Key::FillStrokeColor)) { properties.stroke_color = *fillStrokeColor; computed.effective_classes[layer_name][TransitionablePropertyKey::StrokeColor] = class_name; - } + } else if (const Color *fillColor = klass.get<Color>(Key::FillColor)) { + properties.stroke_color = *fillColor; + computed.effective_classes[layer_name][TransitionablePropertyKey::StrokeColor] = class_name; - if (const PropertyTransition *fillStrokeColorTransition = klass.get<PropertyTransition>(Key::FillStrokeColorTransition)) { - if (fillStrokeColorTransition->duration) { - properties_to_transition[layer_name].emplace(TransitionablePropertyKey::StrokeColor, *fillStrokeColorTransition); + if (const PropertyTransition *fillColorTransition = klass.get<PropertyTransition>(Key::FillColorTransition)) { + if (fillColorTransition->duration) { + properties_to_transition[layer_name].emplace(TransitionablePropertyKey::FillColor, *fillColorTransition); + } } } |