[apps/code] Fix imported script variables fetching

This commit is contained in:
Léa Saviot
2020-04-02 11:17:54 +02:00
committed by Émilie Feral
parent 1e59abf55b
commit 97aaff9430
4 changed files with 9 additions and 6 deletions

View File

@@ -148,7 +148,7 @@ bool VariableBoxController::addNodesFromImportMaybe(mp_parse_node_struct_t * par
}
} else {
// Try fetching the nodes from a script
Script importedScript = m_scriptStore->scriptNamed("polynomial.py"); //TODO LEA
Script importedScript = ScriptStore::ScriptBaseNamed(importationSourceName);
if (!importedScript.isNull()) {
loadGlobalAndImportedVariableInScriptAsImported(importedScript, textToAutocomplete, textToAutocompleteLength);
}