[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:
Léa Saviot
2020-05-28 14:59:30 +02:00
committed by Émilie Feral
parent 6819041c1d
commit 1635f6132b
6 changed files with 80 additions and 21 deletions

View File

@@ -31,7 +31,7 @@ const char * ScriptStore::contentOfScript(const char * name, bool markAsFetched)
return nullptr;
}
if (markAsFetched) {
script.setContentFetchedFromConsole(true);
script.setContentFetchedFromConsole();
}
return script.content();
}
@@ -40,7 +40,7 @@ void ScriptStore::clearFetchInformation() {
// TODO optimize fetches
const int scriptsCount = numberOfScripts();
for (int i = 0; i < scriptsCount; i++) {
scriptAtIndex(i).setContentFetchedFromConsole(false);
scriptAtIndex(i).resetContentFetchedStatus();
}
}