diff --git a/collects/typed-racket/optimizer/tool/tool.rkt b/collects/typed-racket/optimizer/tool/tool.rkt index 2b50aa6aaa..f9ab8f2d71 100644 --- a/collects/typed-racket/optimizer/tool/tool.rkt +++ b/collects/typed-racket/optimizer/tool/tool.rkt @@ -242,7 +242,9 @@ [value #f]))) ; will be updated in `show-optimization-coach' (define/public (show-optimization-coach) - (cond [panel (send (get-area-container) add-child panel)] + (define area-container (get-area-container)) + (cond [panel (or (memq panel (send area-container get-children)) + (send area-container add-child panel))] [else (create-panel)]) ;; update check-boxes (define filters (send (get-definitions-text) get-filters))