mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Fix console reloading that did not occur often enough
Scenario: Write a script that prints "abc" Open the console -> prints "abc" Modify the script to print "ab" Go back to the console -> "ab" not printed !
This commit is contained in:
committed by
EmilieNumworks
parent
460c21801f
commit
ce1cdaacc3
@@ -45,7 +45,7 @@ ConsoleController::ConsoleController(Responder * parentResponder, App * pythonDe
|
||||
}
|
||||
|
||||
bool ConsoleController::loadPythonEnvironment() {
|
||||
if(pythonEnvironmentIsLoaded()) {
|
||||
if (m_pythonDelegate->isPythonUser(this)) {
|
||||
return true;
|
||||
}
|
||||
emptyOutputAccumulationBuffer();
|
||||
@@ -60,16 +60,12 @@ bool ConsoleController::loadPythonEnvironment() {
|
||||
}
|
||||
|
||||
void ConsoleController::unloadPythonEnvironment() {
|
||||
if (pythonEnvironmentIsLoaded()) {
|
||||
if (!m_pythonDelegate->isPythonUser(nullptr)) {
|
||||
m_consoleStore.startNewSession();
|
||||
m_pythonDelegate->deinitPython();
|
||||
}
|
||||
}
|
||||
|
||||
bool ConsoleController::pythonEnvironmentIsLoaded() {
|
||||
return m_pythonDelegate->isPythonUser(this);
|
||||
}
|
||||
|
||||
void ConsoleController::autoImport() {
|
||||
for (int i = 0; i < m_scriptStore->numberOfScripts(); i++) {
|
||||
autoImportScript(m_scriptStore->scriptAtIndex(i));
|
||||
|
||||
Reference in New Issue
Block a user