mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 05:44:50 +02:00
when and ID of a SpatiallyNestable subclass is changed, update the parentID of any children
This commit is contained in:
parent
5a1fe39737
commit
2c449320d0
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ const QUuid SpatiallyNestable::getID() const {
|
|||
}
|
||||
|
||||
void SpatiallyNestable::setID(const QUuid& id) {
|
||||
// adjust the parentID of any children
|
||||
forEachChild([&](SpatiallyNestablePointer object) {
|
||||
object->setParentID(id);
|
||||
});
|
||||
_idLock.withWriteLock([&] {
|
||||
_id = id;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue