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 [sr (box 0)]
(let ([w (box 0)] [sb (box 0)])
[h (box 0)] (when admin
[sr (box 0)] ;; reverse so the topmost snip is the last one
[s (send x get-big-snip)]) (for ([node (in-list (reverse (car (last-pair path))))])
(send admin get-view #f #f w h) (let ([s (send node get-big-snip)])
(send pb get-snip-location s #f sr #t) (send pb get-snip-location s sl st #f)
'(send ec scroll-to (send pb get-snip-location s sr sb #t)
(max 0 (- (unbox sr) (unbox w))) (send pb scroll-to s 0 0 (- (unbox sr) (unbox sl)) (- (unbox sb) (unbox st)) #t))))))
0
(unbox w)
(unbox h)
#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)