Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion core/src/labels/labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ void Labels::processLabelUpdate(const ViewState& viewState,
m_needUpdate |= label->evalState(dt);
label->addVerticesToMesh();
}
if (label->selectionColor()) {
m_selectionLabels.emplace_back(label.get(), tile, isProxy);
}
}
}


std::pair<Label*, Tile*> Labels::getLabel(uint32_t _selectionColor) {

for (auto& entry : m_labels) {
for (auto& entry : m_selectionLabels) {

if (entry.label->visibleState() &&
entry.label->selectionColor() == _selectionColor) {
Expand All @@ -86,6 +89,8 @@ void Labels::updateLabels(const ViewState& _viewState, float _dt,

if (!_onlyTransitions) { m_labels.clear(); }

m_selectionLabels.clear();

m_needUpdate = false;

// int lodDiscard = LODDiscardFunc(View::s_maxZoom, _view.getZoom());
Expand Down
1 change: 1 addition & 0 deletions core/src/labels/labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Labels {
static bool labelComparator(const LabelEntry& _a, const LabelEntry& _b);

std::vector<LabelEntry> m_labels;
std::vector<LabelEntry> m_selectionLabels;

std::unordered_map<size_t, std::vector<Label*>> m_repeatGroups;

Expand Down