Fix part cache not update when add new node

master
Jeremy Hu 2018-09-23 10:41:47 +08:00
parent 2156855444
commit d6b38f5750
2 changed files with 4 additions and 0 deletions

View File

@ -273,6 +273,9 @@ QUuid SkeletonDocument::createNode(float x, float y, float z, float radius, QUui
partId = fromNode->partId; partId = fromNode->partId;
if (isPartReadonly(partId)) if (isPartReadonly(partId))
return QUuid(); return QUuid();
auto part = partMap.find(partId);
if (part != partMap.end())
part->second.dirty = true;
} }
SkeletonNode node; SkeletonNode node;
node.partId = partId; node.partId = partId;

View File

@ -160,6 +160,7 @@ public:
hasColor = other.hasColor; hasColor = other.hasColor;
wrapped = other.wrapped; wrapped = other.wrapped;
componentId = other.componentId; componentId = other.componentId;
dirty = other.dirty;
} }
void updatePreviewMesh(MeshLoader *previewMesh) void updatePreviewMesh(MeshLoader *previewMesh)
{ {