From 2d1d3ca944adc0129e8f4cb62c92c8cd6ad5cc6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Thu, 25 Jun 2020 11:31:01 +0200 Subject: [PATCH] [apps/code] Fix variables loading in the console The two following scenari display empty variable boxes, when there should be loaded variables. 1) Open the console, go back to the scripts menu, go back to the console, open the variable box 2) Open the console, execute mandelbrot, open the variable box --- apps/code/console_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/code/console_controller.cpp b/apps/code/console_controller.cpp index db621ec98..8bae83090 100644 --- a/apps/code/console_controller.cpp +++ b/apps/code/console_controller.cpp @@ -48,6 +48,7 @@ ConsoleController::ConsoleController(Responder * parentResponder, App * pythonDe bool ConsoleController::loadPythonEnvironment() { if (!m_pythonDelegate->isPythonUser(this)) { + m_scriptStore->clearConsoleFetchInformation(); emptyOutputAccumulationBuffer(); m_pythonDelegate->initPythonWithUser(this); MicroPython::registerScriptProvider(m_scriptStore); @@ -173,7 +174,6 @@ const char * ConsoleController::inputText(const char * prompt) { void ConsoleController::viewWillAppear() { ViewController::viewWillAppear(); - m_scriptStore->clearConsoleFetchInformation(); loadPythonEnvironment(); if (m_importScriptsWhenViewAppears) { m_importScriptsWhenViewAppears = false;