fix rectangle computation for shortcircuiting drawing

in the module browser

closes PR 13080
This commit is contained in:
Robby Findler 2012-09-27 11:13:47 -05:00
parent fa891703a8
commit d9a58e5a6d

View File

@ -17,7 +17,8 @@
racket/unit
racket/async-channel
setup/private/lib-roots
racket/port)
racket/port
"rectangle-intersect.rkt")
(define-struct req (filename key))
;; type req = (make-req string[filename] (union symbol #f))
@ -599,10 +600,8 @@
(send dc set-brush search-result-background 'solid)]
[lines-brush
(send dc set-brush lines-brush)])
(when (and (or (<= left x right)
(<= left (+ x snip-width) right))
(or (<= top y bottom)
(<= top (+ y snip-height) bottom)))
(when (rectangles-intersect? left top right bottom
x y (+ x snip-width) (+ y snip-height))
(send dc draw-rectangle x y snip-width snip-height)
(send dc set-text-foreground (send the-color-database find-color
(if found-highlight?