Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Add layer before notifying observer #10272

Merged
merged 1 commit into from
Oct 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mbgl/style/style_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ Layer* Style::Impl::addLayer(std::unique_ptr<Layer> layer, optional<std::string>
}

layer->setObserver(this);
Layer* result = layers.add(std::move(layer), before);
observer->onUpdate();

return layers.add(std::move(layer), before);
return result;
}

std::unique_ptr<Layer> Style::Impl::removeLayer(const std::string& id) {
Expand Down