From 8f3547e3116a2ae5b2efec9f72199f8cef64e047 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 14 Jan 2009 18:21:55 +0000 Subject: [PATCH] added code to remove the graph-pb from the canvas while printing svn: r13117 --- collects/redex/private/traces.ss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/collects/redex/private/traces.ss b/collects/redex/private/traces.ss index e11d7d5141..070bec528b 100644 --- a/collects/redex/private/traces.ss +++ b/collects/redex/private/traces.ss @@ -132,7 +132,7 @@ #:scheme-colors? [scheme-colors? #t] #:colors [colors '()] #:layout [layout void]) - (let-values ([(graph-pb frame) + (let-values ([(graph-pb canvas) (traces reductions pre-exprs #:no-show-frame? #t #:multiple? multiple? @@ -141,11 +141,12 @@ #:scheme-colors? scheme-colors? #:colors colors #:layout layout)]) - (print-to-ps graph-pb filename))) + (print-to-ps graph-pb canvas filename))) -(define (print-to-ps graph-pb filename) +(define (print-to-ps graph-pb canvas filename) (let ([admin (send graph-pb get-admin)] [printing-admin (new printing-editor-admin% [ed graph-pb])]) + (send canvas set-editor #f) (send graph-pb set-admin printing-admin) (dynamic-wind @@ -168,6 +169,7 @@ (λ () (send graph-pb set-admin admin) + (send canvas set-editor graph-pb) (send printing-admin shutdown) ;; do this early (let loop ([snip (send graph-pb find-first-snip)]) (when snip @@ -556,7 +558,7 @@ (do-some-reductions) (semaphore-post s))) (yield s)) - (values graph-pb f)] + (values graph-pb ec)] [else (reduce-button-callback #t) (send f show #t)]))