Fix texture cann't unselect

master
Jeremy Hu 2018-10-11 10:40:35 +08:00
parent 1623d7d782
commit 4c6dc1594f
1 changed files with 3 additions and 3 deletions

View File

@ -141,11 +141,11 @@ void TextureGenerator::prepare()
std::map<QUuid, QUuid> updatedMaterialIdMap; std::map<QUuid, QUuid> updatedMaterialIdMap;
for (const auto &partIt: m_snapshot->parts) { for (const auto &partIt: m_snapshot->parts) {
QUuid materialId;
auto materialIdIt = partIt.second.find("materialId"); auto materialIdIt = partIt.second.find("materialId");
if (materialIdIt == partIt.second.end()) if (materialIdIt != partIt.second.end())
continue; materialId = QUuid(materialIdIt->second);
QUuid partId = QUuid(partIt.first); QUuid partId = QUuid(partIt.first);
QUuid materialId = QUuid(materialIdIt->second);
updatedMaterialIdMap.insert({partId, materialId}); updatedMaterialIdMap.insert({partId, materialId});
} }
for (const auto &bmeshNode: m_resultContext->bmeshNodes) { for (const auto &bmeshNode: m_resultContext->bmeshNodes) {