changeset 2865:199a494a54e0

RT-28888: conditions for setting LabeledText's text fill via -fx-fill did not work with RT-19089 fixes.
author David Grieve<david.grieve@oracle.com>
date Fri, 08 Mar 2013 16:41:03 -0500
parents 929a589c869f
children ffd70842a48d
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledText.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledText.java	Fri Mar 08 15:11:27 2013 -0500
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/LabeledText.java	Fri Mar 08 16:41:03 2013 -0500
@@ -164,14 +164,14 @@
                 StyleOrigin propOrigin = prop.getStyleOrigin();
 
                 //
+                // if propOrigin is greater than origin, then the style should
+                //    not override
                 // if propOrigin is null, then the property is in init state
                 // if origin is null, then some code is initializing this prop
-                // if propOrigin is greater than origin, then the style should
-                //    not override
                 //
-                if (propOrigin == null ||
-                    origin == null ||
-                    propOrigin.compareTo(origin) <= 0) {
+                if ((propOrigin != null && origin != null &&  
+                     propOrigin.compareTo(origin) <= 0) ||
+                    (propOrigin == null && origin == null)) {
                     super.set(node, value, origin);
                 }
             }