[apps/code] Load varbox before returning it in console

This commit is contained in:
Léa Saviot
2020-04-30 10:37:24 +02:00
committed by Émilie Feral
parent d1c8bbdaf7
commit ac654f0097
4 changed files with 25 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ ConsoleController::ConsoleController(Responder * parentResponder, App * pythonDe
m_pythonDelegate(pythonDelegate),
m_importScriptsWhenViewAppears(false),
m_selectableTableView(this, this, this, this),
m_editCell(this, pythonDelegate, this),
m_editCell(this, this, this),
m_scriptStore(scriptStore),
m_sandboxController(this),
m_inputRunLoopActive(false)
@@ -378,6 +378,12 @@ bool ConsoleController::textFieldDidAbortEditing(TextField * textField) {
return true;
}
VariableBoxController * ConsoleController::variableBoxForInputEventHandler(InputEventHandler * textInput) {
VariableBoxController * varBox = App::app()->variableBoxController();
varBox->loadVariablesImportedFromScripts();
return varBox;
}
void ConsoleController::resetSandbox() {
if (stackViewController()->topViewController() != sandbox()) {
return;