mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:21:16 +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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isOverrideScript = it.key().toString().compare(this->_defaultScriptsOverride.toString());
|
||||||
// queue user scripts if restarting
|
// queue user scripts if restarting
|
||||||
if (restart && scriptEngine->isUserLoaded()) {
|
if (restart && (scriptEngine->isUserLoaded() || isOverrideScript)) {
|
||||||
_isReloading = true;
|
_isReloading = true;
|
||||||
ScriptEngine::Type type = scriptEngine->getType();
|
ScriptEngine::Type type = scriptEngine->getType();
|
||||||
|
|
||||||
connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type] (QString scriptName) {
|
connect(scriptEngine.data(), &ScriptEngine::finished, this, [this, type, isOverrideScript](QString scriptName) {
|
||||||
reloadScript(scriptName, true)->setType(type);
|
reloadScript(scriptName, !isOverrideScript)->setType(type);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue