[mcclim-cvs] CVS mcclim

ahefner ahefner at common-lisp.net
Tue Jun 13 02:26:47 UTC 2006


Update of /project/mcclim/cvsroot/mcclim
In directory clnet:/tmp/cvs-serv14138

Modified Files:
	recording.lisp 
Log Message:
Fix 'replay' to work on encapsulated streams.



--- /project/mcclim/cvsroot/mcclim/recording.lisp	2006/05/28 21:32:43	1.127
+++ /project/mcclim/cvsroot/mcclim/recording.lisp	2006/06/13 02:26:46	1.128
@@ -462,21 +462,24 @@
   ())
 
 (defun replay (record stream &optional region)
-  (stream-close-text-output-record stream)
-  (when (stream-drawing-p stream)
-    (with-cursor-off stream ;;FIXME?
-      (letf (((stream-cursor-position stream) (values 0 0))
-             ((stream-recording-p stream) nil)
-	     ;; Is there a better value to bind to baseline?
-             ((slot-value stream 'baseline) (slot-value stream 'baseline)))
-	(with-sheet-medium (medium stream)
-	  (let ((transformation (medium-transformation medium)))
-	    (unwind-protect
-		 (progn
-		   (setf (medium-transformation medium)
-			 +identity-transformation+)
-		   (replay-output-record record stream region))
-	      (setf (medium-transformation medium) transformation))))))))
+  (if (typep stream 'encapsulating-stream)
+      (replay record (encapsulating-stream-stream stream) region)
+      (progn
+        (stream-close-text-output-record stream)
+        (when (stream-drawing-p stream)
+          (with-cursor-off stream ;;FIXME?
+            (letf (((stream-cursor-position stream) (values 0 0))
+                   ((stream-recording-p stream) nil)
+                   ;; Is there a better value to bind to baseline?
+                   ((slot-value stream 'baseline) (slot-value stream 'baseline)))
+              (with-sheet-medium (medium stream)
+                (let ((transformation (medium-transformation medium)))
+                  (unwind-protect
+                       (progn
+                         (setf (medium-transformation medium)
+                               +identity-transformation+)
+                         (replay-output-record record stream region))
+                    (setf (medium-transformation medium) transformation))))))))))
 
 (defmethod replay-output-record ((record compound-output-record) stream
 				 &optional region (x-offset 0) (y-offset 0))




More information about the Mcclim-cvs mailing list