mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix recursive iframe
This commit is contained in:
parent
4f1411b005
commit
c3b50b5ab2
3 changed files with 10 additions and 1 deletions
|
|
@ -25,8 +25,12 @@ void InlineFrame::setDocument(const std::shared_ptr<UiDocument>& document) {
|
|||
if (document == nullptr) {
|
||||
return;
|
||||
}
|
||||
auto newRoot = document->getRoot();
|
||||
if (newRoot->hasParent()) {
|
||||
return;
|
||||
}
|
||||
this->document = document;
|
||||
this->root = document->getRoot();
|
||||
this->root = std::move(newRoot);
|
||||
add(root);
|
||||
|
||||
root->setSize(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue