Fix duplicate entries in threaded location search
This commit is contained in:
parent
109a59b393
commit
d92647b364
2 changed files with 9 additions and 7 deletions
|
@ -326,6 +326,7 @@ private slots:
|
|||
}
|
||||
|
||||
PositionedIDVec newIds = m_search->results();
|
||||
if (!newIds.empty()) {
|
||||
m_ids.reserve(newIds.size());
|
||||
beginInsertRows(QModelIndex(), m_ids.size(), newIds.size() - 1);
|
||||
for (auto id : newIds) {
|
||||
|
@ -333,6 +334,7 @@ private slots:
|
|||
m_items.push_back({}); // null ref
|
||||
}
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
if (m_search->isComplete()) {
|
||||
m_searchActive = false;
|
||||
|
|
|
@ -2476,7 +2476,7 @@ PositionedIDVec NavDataCache::ThreadedGUISearch::results() const
|
|||
PositionedIDVec r;
|
||||
{
|
||||
SGGuard<SGMutex> g(d->lock);
|
||||
r = d->results;
|
||||
r = std::move(d->results);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue