From 12612670f683b3aaa3496df2eefd64a6f0f7261e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 21 May 2015 08:48:12 -0600 Subject: [PATCH] editor-canvas%: fix scroll refresh when scroll bars are hidden --- gui-lib/mred/private/wxme/editor-canvas.rkt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gui-lib/mred/private/wxme/editor-canvas.rkt b/gui-lib/mred/private/wxme/editor-canvas.rkt index ecbbb67a..a5b3eb1a 100644 --- a/gui-lib/mred/private/wxme/editor-canvas.rkt +++ b/gui-lib/mred/private/wxme/editor-canvas.rkt @@ -946,20 +946,21 @@ (or ;; Set x (and (x . > . -1) - (not fake-x-scroll?) (positive? scroll-width) (let ([x (min (->long (min x scroll-width)) 10000000)]) (and (not (= x old-x)) - (begin (set-scroll-pos 'horizontal x) - #t)))) + (begin + (when (not fake-x-scroll?) + (set-scroll-pos 'horizontal x)) + #t)))) ;; Set y (and (y . > . -1) - (not fake-y-scroll?) (positive? scroll-height) (let ([y (min (->long (min y scroll-height)) 10000000)]) (and (not (= y old-y)) (begin - (set-scroll-pos 'vertical y) + (when (not fake-y-scroll?) + (set-scroll-pos 'vertical y)) #t)))))) (set! noloop? savenoloop?)