fixed pb-last-column-visible so the stepper now shows the last column when you click the '->' (next) button

This commit is contained in:
Robby Findler 2010-09-26 21:05:46 -05:00
parent 20252ef150
commit 1f8bbf43a7

View File

@ -402,23 +402,18 @@ todo:
;; makes the last column visible ;; makes the last column visible
(define (pb-last-column-visible) (define (pb-last-column-visible)
(for-each (let ([admin (send pb get-admin)]
(λ (x) [sl (box 0)]
(let ([admin (send pb get-admin)]) [st (box 0)]
(when admin
(let ([w (box 0)]
[h (box 0)]
[sr (box 0)] [sr (box 0)]
[s (send x get-big-snip)]) [sb (box 0)])
(send admin get-view #f #f w h) (when admin
(send pb get-snip-location s #f sr #t) ;; reverse so the topmost snip is the last one
'(send ec scroll-to (for ([node (in-list (reverse (car (last-pair path))))])
(max 0 (- (unbox sr) (unbox w))) (let ([s (send node get-big-snip)])
0 (send pb get-snip-location s sl st #f)
(unbox w) (send pb get-snip-location s sr sb #t)
(unbox h) (send pb scroll-to s 0 0 (- (unbox sr) (unbox sl)) (- (unbox sb) (unbox st)) #t))))))
#t)))))
(car (last-pair path))))
(hash-set! all-nodes-ht term root) (hash-set! all-nodes-ht term root)
(send root set-in-path? #t) (send root set-in-path? #t)