From 251159e64a88f38487803e4ce543743a68b53831 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 10 Sep 2012 15:20:15 -0400 Subject: [PATCH] Allow launching OC when it's already running. --- collects/typed-racket/optimizer/tool/tool.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))