mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 05:30:41 +02:00
allow overlays to be parents
This commit is contained in:
parent
9db817b415
commit
81f6344023
1 changed files with 9 additions and 1 deletions
|
@ -45,12 +45,20 @@ SpatiallyNestableWeakPointer InterfaceParentFinder::find(QUuid parentID, bool& s
|
|||
success = true;
|
||||
return parent;
|
||||
}
|
||||
|
||||
if (parentID == AVATAR_SELF_ID) {
|
||||
success = true;
|
||||
return avatarManager->getMyAvatar();
|
||||
}
|
||||
|
||||
// search overlays
|
||||
auto& overlays = qApp->getOverlays();
|
||||
auto overlay = overlays.getOverlay(parentID);
|
||||
parent = std::dynamic_pointer_cast<SpatiallyNestable>(overlay); // this will return nullptr for non-3d overlays
|
||||
if (!parent.expired()) {
|
||||
success = true;
|
||||
return parent;
|
||||
}
|
||||
|
||||
success = false;
|
||||
return parent;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue