From c8c1b7a53aff45227c650d03ef86b2925308a40b Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Tue, 10 Oct 2023 14:45:03 -0700 Subject: [PATCH] don't start sim when switching to hc (#9715) --- webapp/src/app.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index fdea903bd67..0385ee3f073 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -3755,8 +3755,10 @@ export class ProjectView this.clearSerial(); // Not this.restartSimulator; need full restart to consistently update visuals, // and don't want to steal focus. - this.stopSimulator(); - this.startSimulator(); + if (this.isSimulatorRunning()) { + this.stopSimulator(); + this.startSimulator(); + } const highContrast = this.getData(auth.HIGHCONTRAST); const bodyIsHighContrast = document.body.classList.contains("high-contrast");