mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 13:27:53 +02:00
adding ability to reload defaultOverrdie script without saving to settings:
This commit is contained in:
parent
76e9f8896c
commit
d05f1ac87f
1 changed files with 4 additions and 3 deletions
|
@ -401,13 +401,14 @@ void ScriptEngines::stopAllScripts(bool restart) {
|
|||
continue;
|
||||
}
|
||||
|
||||
bool isOverrideScript = it.key().toString().compare(this->_defaultScriptsOverride.toString());
|
||||
// queue user scripts if restarting
|
||||
if (restart && scriptEngine->isUserLoaded()) {
|
||||
if (restart && (scriptEngine->isUserLoaded() || isOverrideScript)) {
|
||||
_isReloading = true;
|
||||
ScriptEngine::Type type = scriptEngine->getType();
|
||||
|
||||
connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type] (QString scriptName) {
|
||||
reloadScript(scriptName, true)->setType(type);
|
||||
connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type, isOverrideScript](QString scriptName) {
|
||||
reloadScript(scriptName, !isOverrideScript)->setType(type);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue