Skip to content

Commit

Permalink
Fix #5214: Changing classname moves entity back to the 'Default' layer
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 20, 2020
1 parent 89e8843 commit 63db94c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/entitylib.h
Expand Up @@ -467,7 +467,9 @@ inline scene::INodePtr changeEntityClassname(const scene::INodePtr& node,
scene::removeNodeFromParent(oldNode);

// Let the new node keep its layer information (#4710)
newNode->assignToLayers(oldNode->getLayers());
// Apply the layers to the whole subgraph (#5214)
scene::AssignNodeToLayersWalker layerWalker(oldNode->getLayers());
newNode->traverse(layerWalker);

// Insert the new entity to the parent
parent->addChildNode(newNode);
Expand Down

0 comments on commit 63db94c

Please sign in to comment.