when and ID of a SpatiallyNestable subclass is changed, update the parentID of any children

This commit is contained in:
Seth Alves 2016-08-02 08:20:48 -07:00
parent 5a1fe39737
commit 2c449320d0

View file

@ -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;
});