mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
fix infinite recursion on moveInto used to move to descendant node
This commit is contained in:
parent
f5de330f3f
commit
4f1411b005
3 changed files with 10 additions and 3 deletions
|
|
@ -376,14 +376,14 @@ void UINode::setGravity(Gravity gravity) {
|
|||
}
|
||||
}
|
||||
|
||||
bool UINode::isSubnodeOf(const UINode* node) {
|
||||
bool UINode::isDescendantOf(const UINode* node) {
|
||||
if (parent == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (parent == node) {
|
||||
return true;
|
||||
}
|
||||
return parent->isSubnodeOf(node);
|
||||
return parent->isDescendantOf(node);
|
||||
}
|
||||
|
||||
void UINode::getIndices(
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ namespace gui {
|
|||
|
||||
virtual void setGravity(Gravity gravity);
|
||||
|
||||
bool isSubnodeOf(const UINode* node);
|
||||
bool isDescendantOf(const UINode* node);
|
||||
|
||||
/// @brief collect all nodes having id
|
||||
static void getIndices(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue