Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3991,16 +3991,18 @@ void Application::stopAllScripts() { · 3990 unmodified lines | |||
| 3991 | scriptAction->activate(QAction::Trigger); | 3991 | scriptAction->activate(QAction::Trigger); |
| 3992 | qDebug() << "stopping script..." << scriptAction->text(); | 3992 | qDebug() << "stopping script..." << scriptAction->text(); |
| 3993 | } | 3993 | } |
| 3994 | _activeScripts.clear(); | ||
| 3994 | } | 3995 | } |
| 3995 | 3996 | ||
| 3996 | void Application::reloadAllScripts() { | 3997 | void Application::reloadAllScripts() { |
| 3998 | // remember all the current scripts so we can reload them | ||
| 3999 | QStringList reloadList = _activeScripts; | ||
| 3997 | // reloads all current running scripts | 4000 | // reloads all current running scripts |
| 3998 | QList<QAction*> scriptActions = Menu::getInstance()->getActiveScriptsMenu()->actions(); | 4001 | QList<QAction*> scriptActions = Menu::getInstance()->getActiveScriptsMenu()->actions(); |
| 3999 | foreach (QAction* scriptAction, scriptActions) { | 4002 | foreach (QAction* scriptAction, scriptActions) { |
| 4000 | scriptAction->activate(QAction::Trigger); | 4003 | scriptAction->activate(QAction::Trigger); |
| 4001 | qDebug() << "stopping script..." << scriptAction->text(); | 4004 | qDebug() << "stopping script..." << scriptAction->text(); |
| 4002 | } | 4005 | } |
| 4003 | QStringList reloadList = _activeScripts; | ||
| 4004 | _activeScripts.clear(); | 4006 | _activeScripts.clear(); |
| 4005 | foreach (QString scriptName, reloadList){ | 4007 | foreach (QString scriptName, reloadList){ |
| 4006 | qDebug() << "reloading script..." << scriptName; | 4008 | qDebug() << "reloading script..." << scriptName; |