summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layer.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-01 08:34:13 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-06 14:29:22 -0700
commitd6f667a5e762ce1faec80bee774b805fe7ef5e11 (patch)
tree527ae75a142d089203d971d1f909d311f3e51d7b /src/mbgl/style/layer.cpp
parent6d770cb40f1231e202b603fcc63d3b00efc3f551 (diff)
downloadqtlocation-mapboxgl-d6f667a5e762ce1faec80bee774b805fe7ef5e11.tar.gz
[core] Observe visibility changes
Diffstat (limited to 'src/mbgl/style/layer.cpp')
-rw-r--r--src/mbgl/style/layer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/style/layer.cpp b/src/mbgl/style/layer.cpp
index 4d4e793ec0..a78f8c29bc 100644
--- a/src/mbgl/style/layer.cpp
+++ b/src/mbgl/style/layer.cpp
@@ -19,7 +19,10 @@ VisibilityType Layer::getVisibility() const {
}
void Layer::setVisibility(VisibilityType value) {
+ if (value == getVisibility())
+ return;
baseImpl->visibility = value;
+ baseImpl->observer->onLayerVisibilityChanged(*this);
}
float Layer::getMinZoom() const {