mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Fix circular importation in the variable box
Scenario (crashed only on the calculator): script1.py from script2 import * a=1 script2.py from script1 import * b=2
This commit is contained in:
@@ -52,6 +52,7 @@ bool ConsoleController::loadPythonEnvironment() {
|
||||
m_pythonDelegate->initPythonWithUser(this);
|
||||
MicroPython::registerScriptProvider(m_scriptStore);
|
||||
m_importScriptsWhenViewAppears = m_autoImportScripts;
|
||||
m_scriptStore->clearFetchInformation();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -60,7 +61,6 @@ void ConsoleController::unloadPythonEnvironment() {
|
||||
if (!m_pythonDelegate->isPythonUser(nullptr)) {
|
||||
m_consoleStore.startNewSession();
|
||||
m_pythonDelegate->deinitPython();
|
||||
m_scriptStore->clearFetchInformation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user