mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] Fixed Execute Script bug.
When disabling a script auto-import parameter, it would not import itself when executing it from its script parameters menu. Change-Id: If58f6fe1be4792b551ad3b462f1f43e8b82e8148
This commit is contained in:
@@ -281,13 +281,13 @@ void ConsoleController::printText(const char * text, size_t length) {
|
||||
}
|
||||
}
|
||||
|
||||
void ConsoleController::autoImportScriptAtIndex(int index) {
|
||||
void ConsoleController::autoImportScriptAtIndex(int index, bool force) {
|
||||
const char * importCommand1 = "from ";
|
||||
const char * importCommand2 = " import *";
|
||||
int lenImportCommand1 = strlen(importCommand1);
|
||||
int lenImportCommand2 = strlen(importCommand2);
|
||||
Script script = m_scriptStore->scriptAtIndex(index);
|
||||
if (script.autoImport()) {
|
||||
if (script.autoImport() || force) {
|
||||
// Remove the name extension ".py" if there is one.
|
||||
int scriptOriginalNameLength = strlen(script.name());
|
||||
char scriptNewName[scriptOriginalNameLength];
|
||||
|
||||
Reference in New Issue
Block a user