Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -4344,6 +4344,8 @@ void Application::scriptFinished(const QString& scriptName) { · 4343 unmodified lines | ||
| 4344 | 4344 | } |
| 4345 | 4345 | |
| 4346 | 4346 | void Application::stopAllScripts(bool restart) { |
| 4347 | + auto scriptCache = DependencyManager::get<ScriptCache>(); | |
| 4348 | + | |
| 4347 | 4349 | // stops all current running scripts |
| 4348 | 4350 | for (QHash<QString, ScriptEngine*>::const_iterator it = _scriptEnginesHash.constBegin(); |
| 4349 | 4351 | it != _scriptEnginesHash.constEnd(); it++) { |
| @@ -4351,6 +4353,7 @@ void Application::stopAllScripts(bool restart) { · 1 unmodified line | ||
| 4351 | 4353 | continue; |
| 4352 | 4354 | } |
| 4353 | 4355 | if (restart && it.value()->isUserLoaded()) { |
| 4356 | + scriptCache->deleteScript(it.key()); | |
| 4354 | 4357 | connect(it.value(), SIGNAL(finished(const QString&)), SLOT(loadScript(const QString&))); |
| 4355 | 4358 | } |
| 4356 | 4359 | it.value()->stop(); |