From 4c6dc1594f26e4187ab0e2693d208afc8e1318ac Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Thu, 11 Oct 2018 10:40:35 +0800 Subject: [PATCH] Fix texture cann't unselect --- src/texturegenerator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/texturegenerator.cpp b/src/texturegenerator.cpp index 23d5a0da..b8bf2e69 100644 --- a/src/texturegenerator.cpp +++ b/src/texturegenerator.cpp @@ -141,11 +141,11 @@ void TextureGenerator::prepare() std::map updatedMaterialIdMap; for (const auto &partIt: m_snapshot->parts) { + QUuid materialId; auto materialIdIt = partIt.second.find("materialId"); - if (materialIdIt == partIt.second.end()) - continue; + if (materialIdIt != partIt.second.end()) + materialId = QUuid(materialIdIt->second); QUuid partId = QUuid(partIt.first); - QUuid materialId = QUuid(materialIdIt->second); updatedMaterialIdMap.insert({partId, materialId}); } for (const auto &bmeshNode: m_resultContext->bmeshNodes) {