Future visualizer - only redraw overlay when moused-over event changes

(cherry picked from commit 0b8bccc8d4)
This commit is contained in:
James Swaine 2012-07-19 17:05:04 -05:00 committed by Ryan Culpepper
parent a8a6875cd6
commit ce41446bd4
2 changed files with 9 additions and 5 deletions

View File

@ -153,8 +153,12 @@
[pict-builder (λ (vregion) (timeline-pict-for-trace-data vregion the-trace frameinfo segments))]
[hover-handler (λ (x y vregion)
(let ([seg (find-seg-for-coords x y timeline-mouse-index)])
(cond
[(equal? seg hover-seg) #f]
[else
(set! hover-seg seg)
(post-event listener-table 'segment-hover timeline-panel seg)))]
(post-event listener-table 'segment-hover timeline-panel seg)
#t])))]
[click-handler (λ (x y vregion)
(let ([seg (find-seg-for-coords x y timeline-mouse-index)])
(set! tacked-seg seg)