mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix: root node id overriding
This commit is contained in:
parent
17e8d9bb1b
commit
91cb5ab7d8
4 changed files with 8 additions and 9 deletions
|
|
@ -105,7 +105,7 @@ static int l_container_add(lua::State* L) {
|
|||
auto subnode = guiutil::create(
|
||||
engine->getGUI(), xmlsrc, std::move(env)
|
||||
);
|
||||
UINode::getIndices(subnode, docnode.document->getMapWriteable());
|
||||
docnode.document->pushIndices(subnode);
|
||||
node->add(std::move(subnode));
|
||||
} catch (const std::exception& err) {
|
||||
throw std::runtime_error("container:add(...): " + std::string(err.what()));
|
||||
|
|
@ -410,9 +410,7 @@ static const std::string& request_node_id(const DocumentNode& docnode) {
|
|||
reinterpret_cast<std::ptrdiff_t>(docnode.node.get()));
|
||||
}
|
||||
docnode.node->setId(std::move(id));
|
||||
UINode::getIndices(
|
||||
docnode.node, docnode.document->getMapWriteable()
|
||||
);
|
||||
docnode.document->pushIndices(docnode.node);
|
||||
return docnode.node->getId();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue