summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-09-22 15:55:05 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-09-26 11:47:34 +0200
commitae3a02babe557867b115ad69bb83ae3da2cfe43f (patch)
treec0f33f870ded46dbc821ef1c13775aa4cb42abb3 /src
parentafb93d4d3adc9bfb4b3f9b78584e1c2c66c11919 (diff)
downloadqtlocation-mapboxgl-ae3a02babe557867b115ad69bb83ae3da2cfe43f.tar.gz
[core] Reuse Map::update()
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 3ff02aae71..9d8a063c44 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -802,8 +802,7 @@ void Map::addLayer(std::unique_ptr<Layer> layer, const optional<std::string>& be
impl->view.activate();
impl->style->addLayer(std::move(layer), before);
- impl->updateFlags |= Update::Classes;
- impl->asyncUpdate.send();
+ update(Update::Classes);
impl->view.deactivate();
}
@@ -817,8 +816,7 @@ void Map::removeLayer(const std::string& id) {
impl->view.activate();
impl->style->removeLayer(id);
- impl->updateFlags |= Update::Classes;
- impl->asyncUpdate.send();
+ update(Update::Classes);
impl->view.deactivate();
}