Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091920

[Node] Parent and Scene are not set atomically

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx
    • None

      When adding a child to a parent, it's parent is set before it's scene. This might result in wrong assumption in a parent property listener (or any other property that's invalidated by parent invalidation like localToSceneProperty, etc...) that the node has already a scene/subscene. I think we should avoid such middle states in our listeners by postponing the notifications until all of the related properties are set.

      I think there are more places in scenegraph or controls with similar situation: multiple properties that need to be changed atomically in order to keep the invariant.

            Unassigned Unassigned
            msladecek Martin Sládeček
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported: