changeset 1269:0498a5aa3193

RT-21777: Changes for snapshot completely break the NetBeans VisualDebugger feature
author kcr
date Tue, 05 Jun 2012 08:42:25 -0700
parents a9419005d78b
children 7eb62ef86e4f
files javafx-ui-common/src/javafx/scene/Scene.java
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Tue Jun 05 00:21:32 2012 -0700
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Tue Jun 05 08:42:25 2012 -0700
@@ -1051,7 +1051,10 @@
      */
     @Deprecated
     public Object renderToImage(Object platformImage, float scale) {
-        Toolkit.getToolkit().checkFxUserThread();
+        if (!paused) {
+            Toolkit.getToolkit().checkFxUserThread();
+        }
+
         // NOTE: that we no longer use the passed in platform image. Since this
         // API is deprecated and will be removed in 3.0 this is not a concern.
         // Also, we used to return a TK image loader and now we return
@@ -1234,7 +1237,10 @@
      * @return the rendered image
      */
     public WritableImage snapshot(WritableImage image) {
-        Toolkit.getToolkit().checkFxUserThread();
+        if (!paused) {
+            Toolkit.getToolkit().checkFxUserThread();
+        }
+
         return  doSnapshot(image, 1.0f);
     }