From 6ea2c81e68149e74fd16fc837b79978a9f030939 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 24 Feb 2014 10:10:00 -0800 Subject: [PATCH] fix reload of scripts --- interface/src/Application.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 38fee4baba..4dd7b66d1c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4201,7 +4201,9 @@ void Application::reloadAllScripts() { scriptAction->activate(QAction::Trigger); qDebug() << "stopping script..." << scriptAction->text(); } - _activeScripts.clear(); + + // NOTE: we don't need to clear the _activeScripts list because that is handled on script shutdown. + foreach (QString scriptName, reloadList){ qDebug() << "reloading script..." << scriptName; loadScript(scriptName); @@ -4209,7 +4211,7 @@ void Application::reloadAllScripts() { } void Application::removeScriptName(const QString& fileNameString) { - _activeScripts.removeOne(fileNameString); + _activeScripts.removeOne(fileNameString); } void Application::loadScript(const QString& fileNameString) {