Skip to content

Commit

Permalink
fix(composer): reorder doesn't persist after reloading (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheilaXu committed Nov 16, 2022
1 parent d74e45e commit 8c90889
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ const SceneHierarchyDataProvider: FC<SceneHierarchyDataProviderProps> = ({ selec
} else {
updateSceneNodeInternal(oldParentRef, { childRefs: oldParentChildren });
}
// update node to have new parent
updateSceneNodeInternal(objectToMoveRef, { parentRef: newParentRef });
// update new parent to have new child
updateSceneNodeInternal(newParentRef, { childRefs: [...newParent!.childRefs, objectRef] });
// update node to have new parent
updateSceneNodeInternal(objectToMoveRef, { parentRef: newParentRef });
// TODO: create single call to handle this
}
},
Expand Down

0 comments on commit 8c90889

Please sign in to comment.