changeset 4180:b4b7cc4c182a

RT-29738 TableView painting issue with dirtyOpts enabled, treeVisibily fixed for clips
author Martin Sladecek <martin.sladecek@oracle.com>
date Thu, 04 Jul 2013 15:14:52 +0200
parents e9e6bb046dcb
children 62160d20258a
files modules/graphics/src/main/java/javafx/scene/Node.java
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/javafx/scene/Node.java	Wed Jul 03 15:04:42 2013 +0200
+++ b/modules/graphics/src/main/java/javafx/scene/Node.java	Thu Jul 04 15:14:52 2013 +0200
@@ -1059,6 +1059,9 @@
                         impl_markDirty(DirtyBits.NODE_VISIBLE);
                         impl_geomChanged();
                         updateTreeVisible();
+                        if (getClip() != null) {
+                            getClip().updateTreeVisible();
+                        }
                         if (getParent() != null) {
                             // notify the parent of the potential change in visibility
                             // of this node, since visibility affects bounds of the
@@ -6226,11 +6229,13 @@
                             if (oldClip != null) {
                                 oldClip.clipParent = null;
                                 oldClip.setScenes(null, null);
+                                oldClip.updateTreeVisible();
                             }
 
                             if (newClip != null) {
                                 newClip.clipParent = Node.this;
                                 newClip.setScenes(getScene(), getSubScene());
+                                newClip.updateTreeVisible();
                             }
 
                             impl_markDirty(DirtyBits.NODE_CLIP);
@@ -7578,9 +7583,10 @@
     private void updateTreeVisible() {
         boolean isTreeVisible = isVisible();
         if (isTreeVisible) {
-            isTreeVisible = (getParent() == null) ?
-                    (getSubScene() == null || getSubScene().impl_isTreeVisible()) :
-                    getParent().impl_isTreeVisible();
+            final Parent p = getParent(); 
+            isTreeVisible = p != null ? getParent().impl_isTreeVisible() :
+                    clipParent != null ? clipParent.impl_isTreeVisible() : 
+                    getSubScene() == null || getSubScene().impl_isTreeVisible();
         }
         setTreeVisible(isTreeVisible);
     }