changeset 1462:43999fd698ad

Follow-on fix for RT-23395 to preserve the original set value (the first version of the fix did this)
author kcr
date Tue, 17 Jul 2012 09:05:20 -0700
parents 49d71d1bc5af
children 7839d55ac4c0
files javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jul 16 19:48:16 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Tue Jul 17 09:05:20 2012 -0700
@@ -572,9 +572,9 @@
      * out of range.
      */
     public void setGlobalAlpha(double alpha) {
-        alpha = (alpha > 1.0) ? 1.0 : (alpha < 0.0) ? 0.0 : alpha;
         if (curState.globalAlpha != alpha) {
             curState.globalAlpha = alpha;
+            alpha = (alpha > 1.0) ? 1.0 : (alpha < 0.0) ? 0.0 : alpha;
             writeParam(alpha, PGCanvas.GLOBAL_ALPHA);
         }
     }