class: Image
authorClaus Gittinger <cg@exept.de>
Sun, 23 Nov 2014 19:38:49 +0100
changeset 6613 3b0f0fb40c2c
parent 6612 5c05ccaf6275
child 6614 160cf8d7ea05
class: Image changed: #fromScreen:on:grab: initialize local to nil to avoid compiler warning
Image.st
--- a/Image.st	Sun Nov 23 16:53:27 2014 +0100
+++ b/Image.st	Sun Nov 23 19:38:49 2014 +0100
@@ -14178,11 +14178,12 @@
      (especially True- and DirectColor may be wrong).
      Late note: 24bit rgb now also works.
      WARNING: with doGrab true, this temporarily grabs the display
-	      and it may not work from within a buttonMotion
-	      (use with a false grabArg then)."
+              and it may not work from within a buttonMotion
+              (use with a false grabArg then)."
 
     |curs rootView prevGrab|
 
+    curs := nil.
 "/    doGrab ifTrue:[ |cid|
 "/        curs := Cursor sourceForm:(Image fromFile:'bitmaps/Camera.xbm')
 "/                         maskForm:(Image fromFile:'bitmaps/Camera_m.xbm')
@@ -14197,22 +14198,22 @@
     "
     rootView := aDevice rootView.
     doGrab ifTrue:[
-	prevGrab := aDevice activePointerGrab.
-	aDevice grabPointerInView:rootView withCursor:curs.
+        prevGrab := aDevice activePointerGrab.
+        aDevice grabPointerInView:rootView withCursor:curs.
     ].
 
     "
      get the pixels
     "
     [
-	self from:rootView in:aRectangle.
+        self from:rootView in:aRectangle.
     ] ensure:[
-	doGrab ifTrue:[
-	    aDevice ungrabPointer.
-	    prevGrab notNil ifTrue:[
-		 aDevice grabPointerInView:prevGrab.
-	    ]
-	]
+        doGrab ifTrue:[
+            aDevice ungrabPointer.
+            prevGrab notNil ifTrue:[
+                 aDevice grabPointerInView:prevGrab.
+            ]
+        ]
     ]
 
     "
@@ -14441,11 +14442,11 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.460 2014-11-15 15:57:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.461 2014-11-23 18:38:49 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.460 2014-11-15 15:57:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.461 2014-11-23 18:38:49 cg Exp $'
 ! !