Fix invalid mesh cache

master
Jeremy Hu 2018-09-01 18:18:28 +08:00
parent 717c8ef266
commit 6693365543
1 changed files with 2 additions and 0 deletions

View File

@ -226,6 +226,8 @@ void *MeshGenerator::combinePartMesh(QString partId)
std::map<int, QUuid> bmeshToNodeIdMap; std::map<int, QUuid> bmeshToNodeIdMap;
auto &cacheBmeshNodes = m_cacheContext->partBmeshNodes[partId]; auto &cacheBmeshNodes = m_cacheContext->partBmeshNodes[partId];
auto &cacheBmeshVertices = m_cacheContext->partBmeshVertices[partId]; auto &cacheBmeshVertices = m_cacheContext->partBmeshVertices[partId];
cacheBmeshNodes.clear();
cacheBmeshVertices.clear();
for (const auto &nodeId: m_partNodeIds[partId]) { for (const auto &nodeId: m_partNodeIds[partId]) {
auto findNode = m_snapshot->nodes.find(nodeId); auto findNode = m_snapshot->nodes.find(nodeId);
if (findNode == m_snapshot->nodes.end()) { if (findNode == m_snapshot->nodes.end()) {