From 6d348a21148ab1a84bf205e41890badbef0237f5 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 28 Dec 2010 16:31:56 -0600 Subject: [PATCH] change the way scrolling works so that canvases that are 'primary-owner's are respected when calling scroll-to on an admin This change may also affect other attempts to scroll, however, so watch for strange scrollings when multiple editor-canvaess are displaying the same text% object. closes PR 10853 original commit: 5eec85a5a259ce2c461f3fce2eed1f5a017cb8c5 --- collects/mred/private/wxme/editor-canvas.rkt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/mred/private/wxme/editor-canvas.rkt b/collects/mred/private/wxme/editor-canvas.rkt index a12cbeeb..e7223243 100644 --- a/collects/mred/private/wxme/editor-canvas.rkt +++ b/collects/mred/private/wxme/editor-canvas.rkt @@ -1131,17 +1131,17 @@ (define/public (do-scroll-to localx localy w h refresh? bias prev? next? only-focus?) (and canvas - (or (and (not (send canvas is-focus-on?)) + (or (and (or (send canvas is-focus-on?) + (not only-focus?)) + (list (send canvas scroll-to localx localy w h refresh? bias))) + (and (not (send canvas is-focus-on?)) (or (and prev? prevadmin (send prevadmin do-scroll-to localx localy w h refresh? bias #t #f #t)) (and next? nextadmin - (send nextadmin do-scroll-to localx localy w h refresh? bias #f #t #t)))) - (and (or (not only-focus?) - (send canvas is-focus-on?)) - (list (send canvas scroll-to localx localy w h refresh? bias)))))) + (send nextadmin do-scroll-to localx localy w h refresh? bias #f #t #t))))))) (def/override (grab-caret [(symbol-in immediate display global) dist]) (when canvas