changeset 8008:556c2af030c1

RT-38507 [Regression] Animation in Progress Bar is out of place Reviewed by: jgiles
author Martin Sladecek <martin.sladecek@oracle.com>
date Tue, 09 Sep 2014 09:05:01 +0200
parents ac98aaa7adc6
children d94bd6d65452
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Tue Sep 09 09:03:29 2014 +0200
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Tue Sep 09 09:05:01 2014 +0200
@@ -282,11 +282,9 @@
         indeterminateTransition = new IndeterminateTransition(startX, endX, getIndeterminateBarFlip(), this);
         indeterminateTransition.setCycleCount(Timeline.INDEFINITE);
 
-        if (!clipRegion.translateXProperty().isBound()) {
-            clipRegion.translateXProperty().bind(new When(bar.scaleXProperty().isEqualTo(-1.0, 1e-100)).
-                    then(bar.translateXProperty().subtract(w).add(indeterminateBarLengthProperty())).
-                    otherwise(bar.translateXProperty().negate()));
-        }
+        clipRegion.translateXProperty().bind(new When(bar.scaleXProperty().isEqualTo(-1.0, 1e-100)).
+                then(bar.translateXProperty().subtract(w).add(indeterminateBarLengthProperty())).
+                otherwise(bar.translateXProperty().negate()));
     }
 
     boolean wasIndeterminate = false;