mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Hide the sandbox between script importations
This commit is contained in:
committed by
EmilieNumworks
parent
4a8c0a6bd0
commit
a021af46fe
@@ -332,6 +332,13 @@ void ConsoleController::displaySandbox() {
|
||||
stackViewController()->push(&m_sandboxController);
|
||||
}
|
||||
|
||||
void ConsoleController::hideSandbox() {
|
||||
if (!sandboxIsDisplayed()) {
|
||||
return;
|
||||
}
|
||||
m_sandboxController.hide();
|
||||
}
|
||||
|
||||
void ConsoleController::resetSandbox() {
|
||||
if (!sandboxIsDisplayed()) {
|
||||
return;
|
||||
@@ -364,6 +371,12 @@ void ConsoleController::printText(const char * text, size_t length) {
|
||||
}
|
||||
|
||||
void ConsoleController::autoImportScript(Script script, bool force) {
|
||||
if (sandboxIsDisplayed()) {
|
||||
/* The sandbox might be displayed, for instance if we are auto-importing
|
||||
* several scripts that draw at importation. In this case, we want to remove
|
||||
* the sandbox. */
|
||||
hideSandbox();
|
||||
}
|
||||
if (script.importationStatus() || force) {
|
||||
// Step 1 - Create the command "from scriptName import *".
|
||||
|
||||
|
||||
Reference in New Issue
Block a user